Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Apr 2002 23:21:25 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 10568 for review
Message-ID:  <200205010621.g416LPp84535@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=10568

Change 10568 by peter@peter_daintree on 2002/04/30 23:20:30

	It might help if we set up the kern_envp pointers etc *before*
	probing consoles and doing getenv().  Otherwise loader hints
	and variables cannot be found and only work in the static case.

Affected files ...

... //depot/projects/ia64/sys/ia64/ia64/machdep.c#33 edit

Differences ...

==== //depot/projects/ia64/sys/ia64/ia64/machdep.c#33 (text+ko) ====

@@ -381,7 +381,7 @@
 	vm_offset_t kernstartpfn, kernendpfn, pfn0, pfn1;
 	char *p;
 	EFI_MEMORY_DESCRIPTOR *md, *mdp;
-	int mdcount, i;
+	int mdcount, i, metadata_missing;
 
 	/* NO OUTPUT ALLOWED UNTIL FURTHER NOTICE */
 
@@ -446,6 +446,16 @@
 			ia64_pal_base = mdp->PhysicalStart;
 	}
 
+	metadata_missing = 0;
+	if (bootinfo.bi_modulep)
+		preload_metadata = (caddr_t)bootinfo.bi_modulep;
+	else
+		metadata_missing = 1;
+	if (envmode == 1)
+		kern_envp = static_env;
+	else
+		kern_envp = (caddr_t)bootinfo.bi_envp;
+
 	KASSERT(ia64_port_base != 0,
 	    ("%s: no I/O memory region", __func__));
 
@@ -508,13 +518,10 @@
 	/* But if the bootstrap tells us otherwise, believe it! */
 	if (bootinfo.bi_kernend)
 		kernend = round_page(bootinfo.bi_kernend);
-	preload_metadata = (caddr_t)bootinfo.bi_modulep;
-	if (envmode == 1)
-		kern_envp = static_env;
-	else
-		kern_envp = (caddr_t)bootinfo.bi_envp;
+	if (metadata_missing)
+		printf("WARNING: loader(8) metadata is missing!\n");
 
-	/* get fpswa interface */
+	/* Get FPSWA interface */
 	fpswa_interface = (FPSWA_INTERFACE*)IA64_PHYS_TO_RR7(bootinfo.bi_fpswa);
 
 	/* Init basic tunables, including hz */

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205010621.g416LPp84535>