diff options
author | peter <peter@FreeBSD.org> | 2002-05-01 06:52:08 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2002-05-01 06:52:08 +0000 |
commit | dd509e31ee4430348c759b8866aeda1a9196b0ff (patch) | |
tree | 976dc9bf10dd90e579e09326d0923780b3db7344 /sys | |
parent | dfb63f63b0c7c6dbae16ef93e4b9af64c9d3e61a (diff) | |
download | FreeBSD-src-dd509e31ee4430348c759b8866aeda1a9196b0ff.zip FreeBSD-src-dd509e31ee4430348c759b8866aeda1a9196b0ff.tar.gz |
Connect up kern_envp *before* we use it for getenv() and console probing.
It is a bit late after that when we have no consoles. :-]
Also, fix a comment nit and print a warning about missing metadata.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ia64/ia64/machdep.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c index c79abe5..af4726d 100644 --- a/sys/ia64/ia64/machdep.c +++ b/sys/ia64/ia64/machdep.c @@ -381,7 +381,7 @@ ia64_init(u_int64_t arg1, u_int64_t arg2) 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_init(u_int64_t arg1, u_int64_t arg2) 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 @@ ia64_init(u_int64_t arg1, u_int64_t arg2) /* 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 */ |