Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/arch/pc532/pc532 pullup 1.12->1.13 (thorpej): fix t...
details: https://anonhg.NetBSD.org/src/rev/108e98886642
branches: netbsd-1-4
changeset: 468714:108e98886642
user: perry <perry%NetBSD.org@localhost>
date: Fri Jun 18 16:58:56 1999 +0000
description:
pullup 1.12->1.13 (thorpej): fix the 1G RAM bug
diffstat:
sys/arch/pc532/pc532/pmap.new.c | 24 +++++++++++++++++++++---
1 files changed, 21 insertions(+), 3 deletions(-)
diffs (59 lines):
diff -r 79a04fc19b93 -r 108e98886642 sys/arch/pc532/pc532/pmap.new.c
--- a/sys/arch/pc532/pc532/pmap.new.c Fri Jun 18 16:57:15 1999 +0000
+++ b/sys/arch/pc532/pc532/pmap.new.c Fri Jun 18 16:58:56 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.new.c,v 1.10.2.2 1999/04/19 04:34:55 cjs Exp $ */
+/* $NetBSD: pmap.new.c,v 1.10.2.3 1999/06/18 16:58:56 perry Exp $ */
/*
*
@@ -3368,7 +3368,7 @@
* the pmaps on the system.
*/
-void pmap_growkernel(maxkvaddr)
+vaddr_t pmap_growkernel(maxkvaddr)
vaddr_t maxkvaddr;
@@ -3379,7 +3379,7 @@
needed_kpde = (int)(maxkvaddr - VM_MIN_KERNEL_ADDRESS + (NBPD-1)) / NBPD;
if (needed_kpde <= nkpde)
- return; /* we are OK */
+ goto out; /* we are OK */
/*
* whoops! we need to add kernel PTPs
@@ -3390,6 +3390,21 @@
for (/*null*/ ; nkpde < needed_kpde ; nkpde++) {
+ if (pmap_initialized == FALSE) {
+ /*
+ * we're growing the kernel pmap early (from uvm_pageboot_alloc()).
+ * this case must be handled a little differently.
+ */
+ paddr_t ptaddr;
+
+ if (uvm_page_physget(&ptaddr) == FALSE)
+ panic("pmap_growkernel: out of memory");
+
+ kpm->pm_pdir[PDSLOT_KERN + nkpde] = ptaddr | PG_RW | PG_V;
+ kpm->pm_stats.resident_count++; /* count PTP as resident */
+ continue;
+ }
+
pmap_alloc_ptp(kpm, PDSLOT_KERN + nkpde, FALSE);
kpm->pm_pdir[PDSLOT_KERN + nkpde] &= ~PG_u; /* PG_u not for kernel */
@@ -3403,6 +3418,9 @@
simple_unlock(&kpm->pm_obj.vmobjlock);
splx(s);
+
+ out:
+ return (VM_MIN_KERNEL_ADDRESS + (nkpde * NBPD));
}
#ifdef DEBUG
Home |
Main Index |
Thread Index |
Old Index