summaryrefslogtreecommitdiff
path: root/sys/uvm
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/uvm
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/uvm')
-rw-r--r--sys/uvm/uvm.h3
-rw-r--r--sys/uvm/uvm_page.c5
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/uvm/uvm.h b/sys/uvm/uvm.h
index 9668bf485dd..40b9f292229 100644
--- a/sys/uvm/uvm.h
+++ b/sys/uvm/uvm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm.h,v 1.8 2001/03/22 03:05:54 smart Exp $ */
+/* $OpenBSD: uvm.h,v 1.9 2001/04/10 06:59:12 niklas Exp $ */
/* $NetBSD: uvm.h,v 1.16 1999/06/21 17:25:11 thorpej Exp $ */
/*
@@ -81,6 +81,7 @@ struct uvm {
struct pglist page_inactive_obj;/* pages inactive (reclaim or free) */
simple_lock_data_t pageqlock; /* lock for active/inactive page q */
simple_lock_data_t fpageqlock; /* lock for free page q */
+ boolean_t page_init_done; /* TRUE if uvm_page_init() finished */
/* page daemon trigger */
int pagedaemon; /* daemon sleeps on this */
struct proc *pagedaemon_proc; /* daemon's pid */
diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c
index 30f09d49071..14fadaac3b9 100644
--- a/sys/uvm/uvm_page.c
+++ b/sys/uvm/uvm_page.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_page.c,v 1.15 2001/03/22 18:05:33 niklas Exp $ */
+/* $OpenBSD: uvm_page.c,v 1.16 2001/04/10 06:59:12 niklas Exp $ */
/* $NetBSD: uvm_page.c,v 1.24 1999/07/22 22:58:38 thorpej Exp $ */
/*
@@ -338,6 +338,7 @@ uvm_page_init(kvm_startp, kvm_endp)
* done!
*/
+ uvm.page_init_done = TRUE;
}
/*
@@ -481,7 +482,7 @@ uvm_page_physget(paddrp)
#endif
{
- if (vm_physmem[lcv].pgs)
+ if (uvm.page_init_done == TRUE)
panic("vm_page_physget: called _after_ bootstrap");
/* try from front */