summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>2001-04-10 06:59:14 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>2001-04-10 06:59:14 +0000
commit0e620e3db39f58118e3e8148f2fc82ffb451e67c (patch)
tree408eb472eb9c9ade14a66ec7e7f46376383b4db7 /sys/arch/i386
parent517e9482c619086e7cea98ef5591f85bfe04b51d (diff)
Fix for machines which need to enlarge the kernel address space, at least
1GB i386 machines needs this. The fix is heavily based on Jason Thorpe's found in NetBSD. Here is his original commit message: Instead of checking vm_physmem[<physseg>].pgs to determine if uvm_page_init() has completed, add a boolean uvm.page_init_done, and test against that. Use this same boolean (rather than pmap_initialized) in pmap_growkernel() to determine if we are being called via uvm_page_init() to grow the kernel address space. This fixes a problem on some i386 configurations where pmap_init() itself was needing to have the kernel page table grown, and since pmap_initialized was not yet set to TRUE, pmap_growkernel() was choosing the wrong code path.
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/pmap.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c
index 28ec9a8ab5e..31f86a086c6 100644
--- a/sys/arch/i386/i386/pmap.c
+++ b/sys/arch/i386/i386/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.38 2001/03/22 23:36:51 niklas Exp $ */
+/* $OpenBSD: pmap.c,v 1.39 2001/04/10 06:59:13 niklas Exp $ */
/* $NetBSD: pmap.c,v 1.84 2000/02/21 02:01:24 chs Exp $ */
/*
@@ -3658,7 +3658,7 @@ pmap_growkernel(maxkvaddr)
for (/*null*/ ; nkpde < needed_kpde ; nkpde++) {
- if (pmap_initialized == FALSE) {
+ if (uvm.page_init_done == FALSE) {
/*
* we're growing the kernel pmap early (from
@@ -3677,6 +3677,12 @@ pmap_growkernel(maxkvaddr)
continue;
}
+ /*
+ * THIS *MUST* BE CODED SO AS TO WORK IN THE
+ * pmap_initialized == FALSE CASE! WE MAY BE
+ * INVOKED WHILE pmap_init() IS RUNNING!
+ */
+
if (pmap_alloc_ptp(kpm, PDSLOT_KERN + nkpde, FALSE) == NULL) {
panic("pmap_growkernel: alloc ptp failed");
}