summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_page.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>1999-09-03 18:02:30 +0000
committerArtur Grabowski <art@cvs.openbsd.org>1999-09-03 18:02:30 +0000
commit2a4977388d8ca2cef9e73cd2e0bbdaef83b4a180 (patch)
treeccbef58b3ebc3a9038f61326e627ca943e3cb79e /sys/uvm/uvm_page.c
parent49aebb598146d4d57b680055b575b4923212427c (diff)
Change the pmap_enter api to pass down an argument that indicates
the access type that caused this mapping. This is to simplify pmaps with mod/ref emulation (none for the moment) and in some cases speed up pmap_is_{referenced,modified}. At the same time, clean up some mappings that had too high protection. XXX - the access type is incorrect in old vm, it's only used by uvm and MD code. The actual use of this in pmap_enter implementations is not in this commit.
Diffstat (limited to 'sys/uvm/uvm_page.c')
-rw-r--r--sys/uvm/uvm_page.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c
index 6619e707fe5..70ca9b258d3 100644
--- a/sys/uvm/uvm_page.c
+++ b/sys/uvm/uvm_page.c
@@ -438,10 +438,15 @@ uvm_pageboot_alloc(size)
/* XXX: should be wired, but some pmaps don't like that ... */
#if defined(PMAP_NEW)
+ /*
+ * Note this memory is no longer managed, so using
+ * pmap_kenter is safe.
+ */
pmap_kenter_pa(vaddr, paddr, VM_PROT_READ|VM_PROT_WRITE);
#else
pmap_enter(pmap_kernel(), vaddr, paddr,
- VM_PROT_READ|VM_PROT_WRITE, FALSE);
+ VM_PROT_READ|VM_PROT_WRITE, FALSE,
+ VM_PROT_READ|VM_PROT_WRITE);
#endif
}
@@ -982,8 +987,9 @@ uvm_pagealloc_contig(size, low, high, alignment)
pmap_kenter_pa(temp_addr, VM_PAGE_TO_PHYS(pg),
VM_PROT_READ|VM_PROT_WRITE);
#else
- pmap_enter(kernel_map->pmap, temp_addr, VM_PAGE_TO_PHYS(pg),
- UVM_PROT_READ|UVM_PROT_WRITE, TRUE);
+ pmap_enter(pmap_kernel(), temp_addr, VM_PAGE_TO_PHYS(pg),
+ VM_PROT_READ|VM_PROT_WRITE, TRUE,
+ VM_PROT_READ|VM_PROT_WRITE);
#endif
temp_addr += PAGE_SIZE;
}