summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/pmap.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 642ff59..c684e6d 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -1724,10 +1724,12 @@ pmap_growkernel(vm_offset_t addr)
if (pde == NULL) {
/* We need a new PDP entry */
nkpg = vm_page_alloc(NULL, kernel_vm_end >> PDPSHIFT,
- VM_ALLOC_NOOBJ | VM_ALLOC_SYSTEM | VM_ALLOC_WIRED);
+ VM_ALLOC_INTERRUPT | VM_ALLOC_NOOBJ |
+ VM_ALLOC_WIRED | VM_ALLOC_ZERO);
if (nkpg == NULL)
panic("pmap_growkernel: no memory to grow kernel");
- pmap_zero_page(nkpg);
+ if ((nkpg->flags & PG_ZERO) == 0)
+ pmap_zero_page(nkpg);
paddr = VM_PAGE_TO_PHYS(nkpg);
newpdp = (pdp_entry_t)
(paddr | PG_V | PG_RW | PG_A | PG_M);
@@ -1744,10 +1746,12 @@ pmap_growkernel(vm_offset_t addr)
}
nkpg = vm_page_alloc(NULL, pmap_pde_pindex(kernel_vm_end),
- VM_ALLOC_NOOBJ | VM_ALLOC_SYSTEM | VM_ALLOC_WIRED);
+ VM_ALLOC_INTERRUPT | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED |
+ VM_ALLOC_ZERO);
if (nkpg == NULL)
panic("pmap_growkernel: no memory to grow kernel");
- pmap_zero_page(nkpg);
+ if ((nkpg->flags & PG_ZERO) == 0)
+ pmap_zero_page(nkpg);
paddr = VM_PAGE_TO_PHYS(nkpg);
newpdir = (pd_entry_t) (paddr | PG_V | PG_RW | PG_A | PG_M);
*pmap_pde(kernel_pmap, kernel_vm_end) = newpdir;
OpenPOWER on IntegriCloud