diff options
author | peter <peter@FreeBSD.org> | 1999-07-01 18:27:15 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-07-01 18:27:15 +0000 |
commit | 65a02b75eaf2e2268c0d1c8fdf642bfada3f1154 (patch) | |
tree | c66b03cc1cc1ae813ecc193813b8f1e8e63b961b | |
parent | 56161029de9497ca5c9fc5ed2c74778324a869b0 (diff) | |
download | FreeBSD-src-65a02b75eaf2e2268c0d1c8fdf642bfada3f1154.zip FreeBSD-src-65a02b75eaf2e2268c0d1c8fdf642bfada3f1154.tar.gz |
Move kern_envp and preload initialization a little earlier so that we
can do a getenv_int() inside the memory sizing routines to override the
memory limit.
-rw-r--r-- | sys/amd64/amd64/machdep.c | 17 | ||||
-rw-r--r-- | sys/i386/i386/machdep.c | 17 |
2 files changed, 16 insertions, 18 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 48b82fd..0ff0796 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.344 1999/06/24 20:53:24 jlemon Exp $ + * $Id: machdep.c,v 1.345 1999/06/28 15:34:54 luoqi Exp $ */ #include "apm.h" @@ -1521,6 +1521,13 @@ init386(first) atdevbase = ISA_HOLE_START + KERNBASE; + if (bootinfo.bi_modulep) { + preload_metadata = (caddr_t)bootinfo.bi_modulep + KERNBASE; + preload_bootstrap_relocate(KERNBASE); + } + if (bootinfo.bi_envp) + kern_envp = (caddr_t)bootinfo.bi_envp + KERNBASE; + /* * make gdt memory segments, the code segment goes up to end of the * page with etext in it, the data segment goes to the end of @@ -1700,14 +1707,6 @@ init386(first) proc0.p_addr->u_pcb.pcb_mpnest = 1; #endif proc0.p_addr->u_pcb.pcb_ext = 0; - - /* Sigh, relocate physical addresses left from bootstrap */ - if (bootinfo.bi_modulep) { - preload_metadata = (caddr_t)bootinfo.bi_modulep + KERNBASE; - preload_bootstrap_relocate(KERNBASE); - } - if (bootinfo.bi_envp) - kern_envp = (caddr_t)bootinfo.bi_envp + KERNBASE; } #if defined(I586_CPU) && !defined(NO_F00F_HACK) diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 48b82fd..0ff0796 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.344 1999/06/24 20:53:24 jlemon Exp $ + * $Id: machdep.c,v 1.345 1999/06/28 15:34:54 luoqi Exp $ */ #include "apm.h" @@ -1521,6 +1521,13 @@ init386(first) atdevbase = ISA_HOLE_START + KERNBASE; + if (bootinfo.bi_modulep) { + preload_metadata = (caddr_t)bootinfo.bi_modulep + KERNBASE; + preload_bootstrap_relocate(KERNBASE); + } + if (bootinfo.bi_envp) + kern_envp = (caddr_t)bootinfo.bi_envp + KERNBASE; + /* * make gdt memory segments, the code segment goes up to end of the * page with etext in it, the data segment goes to the end of @@ -1700,14 +1707,6 @@ init386(first) proc0.p_addr->u_pcb.pcb_mpnest = 1; #endif proc0.p_addr->u_pcb.pcb_ext = 0; - - /* Sigh, relocate physical addresses left from bootstrap */ - if (bootinfo.bi_modulep) { - preload_metadata = (caddr_t)bootinfo.bi_modulep + KERNBASE; - preload_bootstrap_relocate(KERNBASE); - } - if (bootinfo.bi_envp) - kern_envp = (caddr_t)bootinfo.bi_envp + KERNBASE; } #if defined(I586_CPU) && !defined(NO_F00F_HACK) |