summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2010-12-23 19:53:30 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2010-12-23 19:53:30 +0000
commitdb6b85fde79c7ac85f1a18568b5d69ffff63ee17 (patch)
treea8419855b19731f98e6671a4699d702513fed4cc
parenta2d27a1ebe2c6c90c512d08434e4fd0dee9addbf (diff)
Make the pte created by pmap_map() wired, and count them in pmap_kernel()'s
statistics. This allows these mappings to be removed with pmap_kremove() without messing with accounting.
-rw-r--r--sys/arch/m88k/m88k/pmap.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/arch/m88k/m88k/pmap.c b/sys/arch/m88k/m88k/pmap.c
index 767dfc55e91..fd6d5a6a769 100644
--- a/sys/arch/m88k/m88k/pmap.c
+++ b/sys/arch/m88k/m88k/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.53 2010/06/27 12:41:23 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.54 2010/12/23 19:53:29 miod Exp $ */
/*
* Copyright (c) 2001-2004, Miodrag Vallat
* Copyright (c) 1998-2001 Steve Murphree, Jr.
@@ -430,7 +430,7 @@ pmap_map(vaddr_t virt, paddr_t start, paddr_t end, vm_prot_t prot, u_int cmode)
panic("pmap_map: start greater than end address");
#endif
- template = m88k_protection(prot) | cmode | PG_V;
+ template = m88k_protection(prot) | cmode | PG_W | PG_V;
#ifdef M88110
if (CPU_IS88110 && m88k_protection(prot) != PG_RO)
template |= PG_M;
@@ -452,6 +452,8 @@ pmap_map(vaddr_t virt, paddr_t start, paddr_t end, vm_prot_t prot, u_int cmode)
*pte = template | page;
virt += PAGE_SIZE;
page += PAGE_SIZE;
+ kernel_pmap->pm_stats.resident_count++;
+ kernel_pmap->pm_stats.wired_count++;
}
return virt;
}
@@ -677,12 +679,11 @@ pmap_bootstrap(vaddr_t load_start)
e_text = round_page((vaddr_t)&etext); /* paddr of end of text */
/* map the PROM area */
- vaddr = pmap_map(0, 0, s_text, VM_PROT_WRITE | VM_PROT_READ, CACHE_INH);
+ pmap_map(0, 0, s_text, VM_PROT_WRITE | VM_PROT_READ, CACHE_INH);
/* map the kernel text read only */
- vaddr = pmap_map(s_text, s_text, e_text, VM_PROT_READ, 0);
-
- vaddr = pmap_map(vaddr, e_text, (paddr_t)kmap,
+ pmap_map(s_text, s_text, e_text, VM_PROT_READ, 0);
+ vaddr = pmap_map(e_text, e_text, (paddr_t)kmap,
VM_PROT_WRITE | VM_PROT_READ, 0);
/*