diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 1999-09-03 18:02:30 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 1999-09-03 18:02:30 +0000 |
commit | 2a4977388d8ca2cef9e73cd2e0bbdaef83b4a180 (patch) | |
tree | ccbef58b3ebc3a9038f61326e627ca943e3cb79e /sys/arch/powerpc | |
parent | 49aebb598146d4d57b680055b575b4923212427c (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/arch/powerpc')
-rw-r--r-- | sys/arch/powerpc/powerpc/ofw_machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/powerpc/powerpc/pmap.c | 5 | ||||
-rw-r--r-- | sys/arch/powerpc/powerpc/vm_machdep.c | 7 |
3 files changed, 9 insertions, 7 deletions
diff --git a/sys/arch/powerpc/powerpc/ofw_machdep.c b/sys/arch/powerpc/powerpc/ofw_machdep.c index f80ae668e6b..8f2cb93b6ae 100644 --- a/sys/arch/powerpc/powerpc/ofw_machdep.c +++ b/sys/arch/powerpc/powerpc/ofw_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ofw_machdep.c,v 1.10 1999/07/05 20:56:26 rahnds Exp $ */ +/* $OpenBSD: ofw_machdep.c,v 1.11 1999/09/03 18:01:49 art Exp $ */ /* $NetBSD: ofw_machdep.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */ /* @@ -166,7 +166,7 @@ restore_ofw_mapping() continue; while (size > 0) { - pmap_enter(&ofw_pmap, va, pa, VM_PROT_ALL, 1); + pmap_enter(&ofw_pmap, va, pa, VM_PROT_ALL, 1, 0); pa += NBPG; va += NBPG; size -= NBPG; diff --git a/sys/arch/powerpc/powerpc/pmap.c b/sys/arch/powerpc/powerpc/pmap.c index 0f69dbe758a..45a996e60d9 100644 --- a/sys/arch/powerpc/powerpc/pmap.c +++ b/sys/arch/powerpc/powerpc/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.10 1999/07/05 20:56:26 rahnds Exp $ */ +/* $OpenBSD: pmap.c,v 1.11 1999/09/03 18:01:50 art Exp $ */ /* $NetBSD: pmap.c,v 1.1 1996/09/30 16:34:52 ws Exp $ */ /* @@ -956,11 +956,12 @@ pmap_remove_pv(pm, pteidx, va, pind, pte) * Insert physical page at pa into the given pmap at virtual address va. */ void -pmap_enter(pm, va, pa, prot, wired) +pmap_enter(pm, va, pa, prot, wired, acces_type) struct pmap *pm; vm_offset_t va, pa; vm_prot_t prot; int wired; + vm_prot_t access_type; { sr_t sr; int idx, i, s; diff --git a/sys/arch/powerpc/powerpc/vm_machdep.c b/sys/arch/powerpc/powerpc/vm_machdep.c index 9a25dae28ea..20239aadef3 100644 --- a/sys/arch/powerpc/powerpc/vm_machdep.c +++ b/sys/arch/powerpc/powerpc/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.7 1999/08/17 10:32:17 niklas Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.8 1999/09/03 18:01:51 art Exp $ */ /* $NetBSD: vm_machdep.c,v 1.1 1996/09/30 16:34:57 ws Exp $ */ /* @@ -148,7 +148,8 @@ pagemove(from, to, size) pa = pmap_extract(pmap_kernel(), va); pmap_remove(pmap_kernel(), va, va + NBPG); pmap_enter(pmap_kernel(), (vm_offset_t)to, pa, - VM_PROT_READ | VM_PROT_WRITE, 1); + VM_PROT_READ | VM_PROT_WRITE, 1, + VM_PROT_READ | VM_PROT_WRITE); va += NBPG; to += NBPG; } @@ -239,7 +240,7 @@ vmapbuf(bp, len) for (; len > 0; len -= NBPG) { pa = pmap_extract(vm_map_pmap(&bp->b_proc->p_vmspace->vm_map), faddr); pmap_enter(vm_map_pmap(phys_map), taddr, pa, - VM_PROT_READ | VM_PROT_WRITE, 1); + VM_PROT_READ | VM_PROT_WRITE, 1, 0); faddr += NBPG; taddr += NBPG; } |