summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1999-02-25 21:17:23 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1999-02-25 21:17:23 +0000
commitaaebc7e14e876539291303c9b60fee65ef90dd2b (patch)
tree384ec5feafe3559499e48a60374e63b82e98c300 /sys
parent69844296cb701a7d38ff0d9b39d4878f151e95bd (diff)
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.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/i386/machdep.c6
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 */