diff options
author | 1999-02-25 21:17:22 +0000 | |
---|---|---|
committer | 1999-02-25 21:17:22 +0000 | |
commit | f11b4fe5bc1113e6627ea7820509ac3799ef649b (patch) | |
tree | 77b2bf33a6dcb759a472bf939e99d2ade7551073 | |
parent | chipset-independant irq establishing/handling code; dummy dma stuff (diff) | |
download | wireguard-openbsd-f11b4fe5bc1113e6627ea7820509ac3799ef649b.tar.xz wireguard-openbsd-f11b4fe5bc1113e6627ea7820509ac3799ef649b.zip |
fix /boot arguments mapping.
now fully trust bootargv value passed from the /boot
towards where in the physical memory they are located.
adjust available memory accordingly.
there is a mail coming into misc@ about this patch.
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 880d014281b..1fb3137a8e0 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.100 1999/02/24 22:05:13 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.101 1999/02/25 21:17:22 mickey Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -285,7 +285,7 @@ cpu_startup() /* Boot arguments are in page 1 */ if (bootapiver >= 2) { - pa = NBPG; + pa = (vm_offset_t)bootargv; for (i = 0; i < btoc(bootargc); i++, pa += NBPG) pmap_enter(pmap_kernel(), (vm_offset_t)((caddr_t)bootargp + i * NBPG), @@ -1708,7 +1708,7 @@ init386(first_avail) #if !defined(MACHINE_NEW_NONCONTIG) avail_next = #endif - avail_start = bootapiver >= 2 ? NBPG + i386_round_page(bootargc) : NBPG; + avail_start = bootapiver >= 2? i386_round_page(bootargv+bootargc): NBPG; avail_end = extmem ? IOM_END + extmem * 1024 : cnvmem * 1024; /* just temporary use */ |