summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k
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/arch/mvme88k
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/arch/mvme88k')
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c5
-rw-r--r--sys/arch/mvme88k/mvme88k/mem.c4
-rw-r--r--sys/arch/mvme88k/mvme88k/pmap.c5
-rw-r--r--sys/arch/mvme88k/mvme88k/vm_machdep.c13
4 files changed, 15 insertions, 12 deletions
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index 71c87315fcb..8b3c35570a1 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.15 1999/05/29 04:41:46 smurph Exp $ */
+/* $OpenBSD: machdep.c,v 1.16 1999/09/03 18:01:30 art Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -408,7 +408,8 @@ cpu_startup()
for (i = 0; i < btoc(sizeof(struct msgbuf)); i++)
pmap_enter(kernel_pmap, (vm_offset_t)msgbufp,
- avail_end + i * NBPG, VM_PROT_ALL, TRUE);
+ avail_end + i * NBPG, VM_PROT_READ|VM_PROT_WRITE,
+ VM_PROT_READ|VM_PROT_WRITE, TRUE);
msgbufmapped = 1;
diff --git a/sys/arch/mvme88k/mvme88k/mem.c b/sys/arch/mvme88k/mvme88k/mem.c
index c7121fbd9c5..dd26c44343d 100644
--- a/sys/arch/mvme88k/mvme88k/mem.c
+++ b/sys/arch/mvme88k/mvme88k/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.3 1999/02/09 06:36:30 smurph Exp $ */
+/* $OpenBSD: mem.c,v 1.4 1999/09/03 18:01:31 art Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -131,7 +131,7 @@ mmrw(dev, uio, flags)
}
pmap_enter(pmap_kernel(), (vm_offset_t)vmmap,
trunc_page(v), uio->uio_rw == UIO_READ ?
- VM_PROT_READ : VM_PROT_WRITE, TRUE);
+ VM_PROT_READ : VM_PROT_WRITE, TRUE, 0);
o = uio->uio_offset & PGOFSET;
c = min(uio->uio_resid, (int)(NBPG - o));
error = uiomove((caddr_t)vmmap + o, c, uio);
diff --git a/sys/arch/mvme88k/mvme88k/pmap.c b/sys/arch/mvme88k/mvme88k/pmap.c
index 566174e23d5..d519d7ad3ea 100644
--- a/sys/arch/mvme88k/mvme88k/pmap.c
+++ b/sys/arch/mvme88k/mvme88k/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.10 1999/07/18 18:00:07 deraadt Exp $ */
+/* $OpenBSD: pmap.c,v 1.11 1999/09/03 18:01:31 art Exp $ */
/*
* Copyright (c) 1996 Nivas Madhur
* All rights reserved.
@@ -2729,7 +2729,8 @@ pmap_expand(pmap_t map, vm_offset_t v)
*/
void
pmap_enter(pmap_t pmap, vm_offset_t va, vm_offset_t pa,
- vm_prot_t prot, boolean_t wired)
+ vm_prot_t prot, boolean_t wired,
+ vm_prot_t access_type)
{
int ap;
int spl, spl_sav;
diff --git a/sys/arch/mvme88k/mvme88k/vm_machdep.c b/sys/arch/mvme88k/mvme88k/vm_machdep.c
index 79f2b3ed93f..b5f06c33586 100644
--- a/sys/arch/mvme88k/mvme88k/vm_machdep.c
+++ b/sys/arch/mvme88k/mvme88k/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.9 1999/08/17 10:32:17 niklas Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.10 1999/09/03 18:01:33 art Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -42,7 +42,7 @@
* from: Utah $Hdr: vm_machdep.c 1.21 91/04/06$
* from: @(#)vm_machdep.c 7.10 (Berkeley) 5/7/91
* vm_machdep.c,v 1.3 1993/07/07 07:09:32 cgd Exp
- * $Id: vm_machdep.c,v 1.9 1999/08/17 10:32:17 niklas Exp $
+ * $Id: vm_machdep.c,v 1.10 1999/09/03 18:01:33 art Exp $
*/
#include <sys/param.h>
@@ -262,7 +262,7 @@ vmapbuf(struct buf *bp, vm_size_t len)
if (pa == 0)
panic("vmapbuf: null page frame");
pmap_enter(vm_map_pmap(phys_map), kva, pa,
- VM_PROT_READ|VM_PROT_WRITE, TRUE);
+ VM_PROT_READ|VM_PROT_WRITE, TRUE, 0);
addr += PAGE_SIZE;
kva += PAGE_SIZE;
len -= PAGE_SIZE;
@@ -339,7 +339,7 @@ iomap_mapin(vm_offset_t pa, vm_size_t len, boolean_t canwait)
while (len>0) {
pmap_enter(vm_map_pmap(iomap_map), tva, ppa,
- VM_PROT_WRITE|VM_PROT_READ|(CACHE_INH << 16), 1);
+ VM_PROT_WRITE|VM_PROT_READ|(CACHE_INH << 16), 1, 0);
len -= PAGE_SIZE;
tva += PAGE_SIZE;
ppa += PAGE_SIZE;
@@ -416,7 +416,7 @@ mapiospace(caddr_t pa, int len)
pa = (caddr_t)trunc_page(pa);
pmap_enter(kernel_pmap, phys_map_vaddr1, (vm_offset_t)pa,
- VM_PROT_READ|VM_PROT_WRITE, 1);
+ VM_PROT_READ|VM_PROT_WRITE, 1, 0);
return (phys_map_vaddr1 + off);
}
@@ -509,7 +509,8 @@ pagemove(caddr_t from, caddr_t to, size_t size)
pmap_remove(kernel_pmap,
(vm_offset_t)from, (vm_offset_t)from + NBPG);
pmap_enter(kernel_pmap,
- (vm_offset_t)to, pa, VM_PROT_READ|VM_PROT_WRITE, 1);
+ (vm_offset_t)to, pa, VM_PROT_READ|VM_PROT_WRITE, 1,
+ VM_PROT_READ|VM_PROT_WRITE);
from += NBPG;
to += NBPG;
size -= NBPG;