diff options
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/alpha/alpha/pmap.c | 16 | ||||
-rw-r--r-- | sys/arch/i386/i386/pmap.c | 10 | ||||
-rw-r--r-- | sys/arch/vax/vax/pmap.c | 11 |
3 files changed, 15 insertions, 22 deletions
diff --git a/sys/arch/alpha/alpha/pmap.c b/sys/arch/alpha/alpha/pmap.c index b981c71d423..258247c401d 100644 --- a/sys/arch/alpha/alpha/pmap.c +++ b/sys/arch/alpha/alpha/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.11 2001/03/16 14:10:23 art Exp $ */ +/* $OpenBSD: pmap.c,v 1.12 2001/04/10 06:59:13 niklas Exp $ */ /* $NetBSD: pmap.c,v 1.148 2000/09/22 05:23:37 thorpej Exp $ */ /*- @@ -1065,14 +1065,8 @@ pmap_steal_memory(vsize_t size, vaddr_t *vstartp, vaddr_t *vendp) #endif for (bank = 0; bank < vm_nphysseg; bank++) { -#if 0 if (uvm.page_init_done == TRUE) panic("pmap_steal_memory: called _after_ bootstrap"); -#else - /* XXXX */ - if (vm_physmem[0].pgs) - panic("vm_page_physget: called _after_ bootstrap"); -#endif #if 0 @@ -3448,11 +3442,7 @@ pmap_growkernel(vaddr_t maxkvaddr) /* * XXX PGU_NORMAL? It's not a "traditional" PT page. */ -#ifdef notyet if (uvm.page_init_done == FALSE) { -#else - if (vm_physmem[0].pgs == NULL) { -#endif /* * We're growing the kernel pmap early (from * uvm_pageboot_alloc()). This case must @@ -3493,11 +3483,7 @@ pmap_growkernel(vaddr_t maxkvaddr) */ l2pte = pmap_l2pte(kpm, va, l1pte); KASSERT(pmap_pte_v(l2pte) == 0); -#ifdef notyet if (uvm.page_init_done == FALSE) { -#else - if (vm_physmem[0].pgs == NULL) { -#endif /* * See above. */ 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"); } diff --git a/sys/arch/vax/vax/pmap.c b/sys/arch/vax/vax/pmap.c index 0390dc4d539..43f4f758abd 100644 --- a/sys/arch/vax/vax/pmap.c +++ b/sys/arch/vax/vax/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.12 2000/10/11 11:40:17 bjc Exp $ */ +/* $OpenBSD: pmap.c,v 1.13 2001/04/10 06:59:13 niklas Exp $ */ /* $NetBSD: pmap.c,v 1.74 1999/11/13 21:32:25 matt Exp $ */ /* * Copyright (c) 1994, 1998, 1999 Ludd, University of Lule}, Sweden. @@ -297,14 +297,15 @@ pmap_steal_memory(size, vstartp, vendp) size = round_page(size); npgs = btoc(size); - /* - * A vax only have one segment of memory. - */ #ifdef DIAGNOSTIC - if (vm_physmem[0].pgs) + if (uvm.page_init_done == TRUE) panic("pmap_steal_memory: called _after_ bootstrap"); #endif + /* + * A vax only have one segment of memory. + */ + v = (vm_physmem[0].avail_start << PGSHIFT) | KERNBASE; vm_physmem[0].avail_start += npgs; vm_physmem[0].start += npgs; |