summaryrefslogtreecommitdiff
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
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.
-rw-r--r--sys/arch/alpha/alpha/pmap.c5
-rw-r--r--sys/arch/alpha/alpha/vm_machdep.c4
-rw-r--r--sys/arch/amiga/amiga/machdep.c5
-rw-r--r--sys/arch/amiga/amiga/mem.c4
-rw-r--r--sys/arch/amiga/amiga/pmap.c10
-rw-r--r--sys/arch/amiga/amiga/vm_machdep.c7
-rw-r--r--sys/arch/arc/arc/pmap.c7
-rw-r--r--sys/arch/hp300/hp300/leds.c4
-rw-r--r--sys/arch/hp300/hp300/machdep.c9
-rw-r--r--sys/arch/hp300/hp300/mem.c4
-rw-r--r--sys/arch/hp300/hp300/pmap.c18
-rw-r--r--sys/arch/hp300/hp300/trap.c5
-rw-r--r--sys/arch/hp300/hp300/vm_machdep.c7
-rw-r--r--sys/arch/hppa/hppa/dma.c4
-rw-r--r--sys/arch/hppa/hppa/machdep.c8
-rw-r--r--sys/arch/hppa/hppa/pmap.c9
-rw-r--r--sys/arch/hppa/hppa/vm_machdep.c9
-rw-r--r--sys/arch/i386/i386/machdep.c22
-rw-r--r--sys/arch/i386/i386/mem.c4
-rw-r--r--sys/arch/i386/i386/pmap.c7
-rw-r--r--sys/arch/i386/i386/pmap.old.c7
-rw-r--r--sys/arch/m68k/m68k/mappedcopy.c8
-rw-r--r--sys/arch/mac68k/dev/nubus.c5
-rw-r--r--sys/arch/mac68k/mac68k/bus_space.c4
-rw-r--r--sys/arch/mac68k/mac68k/machdep.c8
-rw-r--r--sys/arch/mac68k/mac68k/mem.c4
-rw-r--r--sys/arch/mac68k/mac68k/pmap.c18
-rw-r--r--sys/arch/mac68k/mac68k/trap.c5
-rw-r--r--sys/arch/mac68k/mac68k/vm_machdep.c5
-rw-r--r--sys/arch/mips/mips/vm_machdep.c4
-rw-r--r--sys/arch/mvme68k/mvme68k/machdep.c5
-rw-r--r--sys/arch/mvme68k/mvme68k/mem.c4
-rw-r--r--sys/arch/mvme68k/mvme68k/pmap.c18
-rw-r--r--sys/arch/mvme68k/mvme68k/trap.c5
-rw-r--r--sys/arch/mvme68k/mvme68k/vm_machdep.c7
-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
-rw-r--r--sys/arch/pmax/pmax/pmap.c3
-rw-r--r--sys/arch/pmax/pmax/vm_machdep.c2
-rw-r--r--sys/arch/powerpc/powerpc/ofw_machdep.c4
-rw-r--r--sys/arch/powerpc/powerpc/pmap.c5
-rw-r--r--sys/arch/powerpc/powerpc/vm_machdep.c7
-rw-r--r--sys/arch/sparc/include/pmap.h8
-rw-r--r--sys/arch/sparc/sparc/autoconf.c5
-rw-r--r--sys/arch/sparc/sparc/machdep.c10
-rw-r--r--sys/arch/sparc/sparc/mem.c4
-rw-r--r--sys/arch/sparc/sparc/pmap.c17
-rw-r--r--sys/arch/sparc/sparc/vm_machdep.c16
-rw-r--r--sys/uvm/uvm_device.c3
-rw-r--r--sys/uvm/uvm_fault.c8
-rw-r--r--sys/uvm/uvm_glue.c2
-rw-r--r--sys/uvm/uvm_km.c16
-rw-r--r--sys/uvm/uvm_page.c12
-rw-r--r--sys/uvm/uvm_pager.c17
-rw-r--r--sys/vm/pmap.h4
-rw-r--r--sys/vm/vm_fault.c6
-rw-r--r--sys/vm/vm_glue.c4
-rw-r--r--sys/vm/vm_kern.c4
-rw-r--r--sys/vm/vm_map.c4
-rw-r--r--sys/vm/vm_page.c8
-rw-r--r--sys/vm/vm_pager.c4
63 files changed, 254 insertions, 205 deletions
diff --git a/sys/arch/alpha/alpha/pmap.c b/sys/arch/alpha/alpha/pmap.c
index 2357e853826..8b918d71ebe 100644
--- a/sys/arch/alpha/alpha/pmap.c
+++ b/sys/arch/alpha/alpha/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.5 1996/10/30 22:38:20 niklas Exp $ */
+/* $OpenBSD: pmap.c,v 1.6 1999/09/03 18:00:11 art Exp $ */
/* $NetBSD: pmap.c,v 1.17 1996/10/13 02:59:42 christos Exp $ */
/*
@@ -1722,12 +1722,13 @@ db_printf("[%d]pmap_protect(%x,%x,%x,%x)\n", cpu_number(), map, s, e, prot);
* insert this page into the given map NOW.
*/
void
-pmap_enter(pmap, v, pa, prot, wired)
+pmap_enter(pmap, v, pa, prot, wired, access_type)
register pmap_t pmap;
vm_offset_t v;
register vm_offset_t pa;
vm_prot_t prot;
boolean_t wired;
+ vm_prot_t access_type;
{
register pt_entry_t *pte;
register pv_entry_t pv_h;
diff --git a/sys/arch/alpha/alpha/vm_machdep.c b/sys/arch/alpha/alpha/vm_machdep.c
index a5880097ec8..2a5094f0f10 100644
--- a/sys/arch/alpha/alpha/vm_machdep.c
+++ b/sys/arch/alpha/alpha/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.10 1999/08/17 10:32:16 niklas Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.11 1999/09/03 18:00:13 art Exp $ */
/* $NetBSD: vm_machdep.c,v 1.21 1996/11/13 21:13:15 cgd Exp $ */
/*
@@ -418,7 +418,7 @@ vmapbuf(bp, len)
if (pa == 0)
panic("vmapbuf: null page frame");
pmap_enter(vm_map_pmap(phys_map), taddr, trunc_page(pa),
- VM_PROT_READ|VM_PROT_WRITE, TRUE);
+ VM_PROT_READ|VM_PROT_WRITE, TRUE, 0);
faddr += PAGE_SIZE;
taddr += PAGE_SIZE;
}
diff --git a/sys/arch/amiga/amiga/machdep.c b/sys/arch/amiga/amiga/machdep.c
index 6bd3da26b44..7ce67d58b9c 100644
--- a/sys/arch/amiga/amiga/machdep.c
+++ b/sys/arch/amiga/amiga/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.33 1999/05/24 23:08:58 jason Exp $ */
+/* $OpenBSD: machdep.c,v 1.34 1999/09/03 18:00:28 art Exp $ */
/* $NetBSD: machdep.c,v 1.95 1997/08/27 18:31:17 is Exp $ */
/*
@@ -329,7 +329,8 @@ cpu_startup()
/* avail_end was pre-decremented in pmap_bootstrap to compensate */
for (i = 0; i < btoc(sizeof (struct msgbuf)); i++)
pmap_enter(pmap_kernel(), (vm_offset_t)msgbufp,
- avail_end + i * NBPG, VM_PROT_ALL, TRUE);
+ avail_end + i * NBPG, VM_PROT_READ|VM_PROT_WRITE, TRUE,
+ VM_PROT_READ|VM_PROT_WRITE);
msgbufmapped = 1;
/*
diff --git a/sys/arch/amiga/amiga/mem.c b/sys/arch/amiga/amiga/mem.c
index be28dc7c5c6..5d045f20cc8 100644
--- a/sys/arch/amiga/amiga/mem.c
+++ b/sys/arch/amiga/amiga/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.6 1998/08/31 17:42:27 millert Exp $ */
+/* $OpenBSD: mem.c,v 1.7 1999/09/03 18:00:29 art Exp $ */
/* $NetBSD: mem.c,v 1.18 1997/02/02 07:17:14 thorpej Exp $ */
/*
@@ -144,7 +144,7 @@ mmrw(dev, uio, flags)
#endif
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/amiga/amiga/pmap.c b/sys/arch/amiga/amiga/pmap.c
index c7b817d5997..baf16996364 100644
--- a/sys/arch/amiga/amiga/pmap.c
+++ b/sys/arch/amiga/amiga/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.15 1999/07/18 18:00:03 deraadt Exp $ */
+/* $OpenBSD: pmap.c,v 1.16 1999/09/03 18:00:29 art Exp $ */
/* $NetBSD: pmap.c,v 1.39 1997/06/10 18:26:41 veego Exp $ */
/*
@@ -859,7 +859,7 @@ pmap_map(virt, start, end, prot)
prot);
#endif
while (start < end) {
- pmap_enter(pmap_kernel(), virt, start, prot, FALSE);
+ pmap_enter(pmap_kernel(), virt, start, prot, FALSE, 0);
virt += PAGE_SIZE;
start += PAGE_SIZE;
}
@@ -1405,12 +1405,13 @@ pmap_protect(pmap, sva, eva, prot)
extern int kernel_copyback;
void
-pmap_enter(pmap, va, pa, prot, wired)
+pmap_enter(pmap, va, pa, prot, wired, access_type)
register pmap_t pmap;
vm_offset_t va;
register vm_offset_t pa;
vm_prot_t prot;
boolean_t wired;
+ vm_prot_t access_type;
{
register u_int *pte;
register int npte;
@@ -2416,7 +2417,8 @@ pmap_enter_ptpage(pmap, va)
kpt_used_list = kpt;
ptpa = kpt->kpt_pa;
bzero((char *)kpt->kpt_va, NBPG);
- pmap_enter(pmap, va, ptpa, VM_PROT_DEFAULT, TRUE);
+ pmap_enter(pmap, va, ptpa, VM_PROT_DEFAULT, TRUE,
+ VM_PROT_DEFAULT);
#if defined(M68060)
if (machineid & AMIGA_68060) {
pmap_changebit(ptpa, PG_CCB, 0);
diff --git a/sys/arch/amiga/amiga/vm_machdep.c b/sys/arch/amiga/amiga/vm_machdep.c
index d941aea6697..b4702a102dc 100644
--- a/sys/arch/amiga/amiga/vm_machdep.c
+++ b/sys/arch/amiga/amiga/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.10 1999/08/17 10:32:16 niklas Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.11 1999/09/03 18:00:30 art Exp $ */
/* $NetBSD: vm_machdep.c,v 1.30 1997/05/19 10:14:50 veego Exp $ */
/*
@@ -185,7 +185,8 @@ pagemove(from, to, size)
pmap_remove(pmap_kernel(), (vm_offset_t)from,
(vm_offset_t)from + PAGE_SIZE);
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);
from += PAGE_SIZE;
to += PAGE_SIZE;
size -= PAGE_SIZE;
@@ -387,7 +388,7 @@ vmapbuf(bp, sz)
if (pa == 0)
panic("vmapbuf: null page frame");
pmap_enter(vm_map_pmap(phys_map), kva, trunc_page(pa),
- VM_PROT_READ|VM_PROT_WRITE, TRUE);
+ VM_PROT_READ|VM_PROT_WRITE, TRUE, 0);
addr += PAGE_SIZE;
kva += PAGE_SIZE;
}
diff --git a/sys/arch/arc/arc/pmap.c b/sys/arch/arc/arc/pmap.c
index 622f9bec69e..f28f111cc6a 100644
--- a/sys/arch/arc/arc/pmap.c
+++ b/sys/arch/arc/arc/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.14 1998/07/13 05:03:30 imp Exp $ */
+/* $OpenBSD: pmap.c,v 1.15 1999/09/03 18:00:34 art Exp $ */
/*
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 8.4 (Berkeley) 1/26/94
- * $Id: pmap.c,v 1.14 1998/07/13 05:03:30 imp Exp $
+ * $Id: pmap.c,v 1.15 1999/09/03 18:00:34 art Exp $
*/
/*
@@ -993,12 +993,13 @@ pmap_page_cache(pa,mode)
* insert this page into the given map NOW.
*/
void
-pmap_enter(pmap, va, pa, prot, wired)
+pmap_enter(pmap, va, pa, prot, wired, access_type)
register pmap_t pmap;
vm_offset_t va;
register vm_offset_t pa;
vm_prot_t prot;
boolean_t wired;
+ vm_prot_t access_type;
{
register pt_entry_t *pte;
register u_int npte;
diff --git a/sys/arch/hp300/hp300/leds.c b/sys/arch/hp300/hp300/leds.c
index cea0cdb65eb..ee354aee1be 100644
--- a/sys/arch/hp300/hp300/leds.c
+++ b/sys/arch/hp300/hp300/leds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: leds.c,v 1.1 1997/07/06 08:02:03 downsj Exp $ */
+/* $OpenBSD: leds.c,v 1.2 1999/09/03 18:00:41 art Exp $ */
/* $NetBSD: leds.c,v 1.1 1997/05/05 20:54:35 thorpej Exp $ */
/*
@@ -61,7 +61,7 @@ ledinit()
{
pmap_enter(pmap_kernel(), (vm_offset_t)ledbase, (vm_offset_t)LED_ADDR,
- VM_PROT_READ|VM_PROT_WRITE, TRUE);
+ VM_PROT_READ|VM_PROT_WRITE, TRUE, VM_PROT_READ|VM_PROT_WRITE);
ledaddr = (u_int8_t *) ((long)ledbase | (LED_ADDR & PGOFSET));
}
diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c
index 0f269f318d9..323c8fd9cab 100644
--- a/sys/arch/hp300/hp300/machdep.c
+++ b/sys/arch/hp300/hp300/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.37 1999/05/22 21:22:22 weingart Exp $ */
+/* $OpenBSD: machdep.c,v 1.38 1999/09/03 18:00:41 art Exp $ */
/* $NetBSD: machdep.c,v 1.94 1997/06/12 15:46:29 mrg Exp $ */
/*
@@ -249,7 +249,8 @@ cpu_startup()
*/
for (i = 0; i < btoc(sizeof (struct msgbuf)); i++)
pmap_enter(pmap_kernel(), (vm_offset_t)msgbufp,
- avail_end + i * NBPG, VM_PROT_ALL, TRUE);
+ avail_end + i * NBPG, VM_PROT_READ|VM_PROT_WRITE, TRUE,
+ VM_PROT_READ|VM_PROT_WRITE);
msgbufmapped = 1;
/*
@@ -972,7 +973,7 @@ dumpsys()
printf("%d ", pg / NPGMB);
#undef NPGMB
pmap_enter(pmap_kernel(), (vm_offset_t)vmmap, maddr,
- VM_PROT_READ, TRUE);
+ VM_PROT_READ, TRUE, 0);
error = (*dump)(dumpdev, blkno, vmmap, NBPG);
switch (error) {
@@ -1270,7 +1271,7 @@ parityerrorfind()
ecacheoff();
for (pg = btoc(lowram); pg < btoc(lowram)+physmem; pg++) {
pmap_enter(pmap_kernel(), (vm_offset_t)vmmap, ctob(pg),
- VM_PROT_READ, TRUE);
+ VM_PROT_READ, TRUE, VM_PROT_READ);
ip = (int *)vmmap;
for (o = 0; o < NBPG; o += sizeof(int))
i = *ip++;
diff --git a/sys/arch/hp300/hp300/mem.c b/sys/arch/hp300/hp300/mem.c
index d8cda1d3e75..625175d9fad 100644
--- a/sys/arch/hp300/hp300/mem.c
+++ b/sys/arch/hp300/hp300/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.8 1998/11/20 06:58:51 downsj Exp $ */
+/* $OpenBSD: mem.c,v 1.9 1999/09/03 18:00:42 art Exp $ */
/* $NetBSD: mem.c,v 1.17 1997/06/10 18:51:31 veego Exp $ */
/*
@@ -143,7 +143,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/hp300/hp300/pmap.c b/sys/arch/hp300/hp300/pmap.c
index d8ebdaf52ea..4fc5f084e2c 100644
--- a/sys/arch/hp300/hp300/pmap.c
+++ b/sys/arch/hp300/hp300/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.13 1999/07/18 18:00:04 deraadt Exp $ */
+/* $OpenBSD: pmap.c,v 1.14 1999/09/03 18:00:42 art Exp $ */
/* $NetBSD: pmap.c,v 1.36 1997/06/10 18:52:23 veego Exp $ */
/*
@@ -646,7 +646,7 @@ pmap_map(va, spa, epa, prot)
#endif
while (spa < epa) {
- pmap_enter(pmap_kernel(), va, spa, prot, FALSE);
+ pmap_enter(pmap_kernel(), va, spa, prot, FALSE, 0);
va += NBPG;
spa += NBPG;
}
@@ -1131,12 +1131,13 @@ pmap_protect(pmap, sva, eva, prot)
* insert this page into the given map NOW.
*/
void
-pmap_enter(pmap, va, pa, prot, wired)
+pmap_enter(pmap, va, pa, prot, wired, access_type)
pmap_t pmap;
vm_offset_t va;
vm_offset_t pa;
vm_prot_t prot;
boolean_t wired;
+ vm_prot_t access_type;
{
pt_entry_t *pte;
int npte;
@@ -1734,7 +1735,8 @@ pmap_zero_page(phys)
printf("pmap_zero_page(%lx)\n", phys);
#endif
kva = (vm_offset_t) CADDR1;
- pmap_enter(pmap_kernel(), kva, phys, VM_PROT_READ|VM_PROT_WRITE, TRUE);
+ pmap_enter(pmap_kernel(), kva, phys, VM_PROT_READ|VM_PROT_WRITE, TRUE,
+ VM_PROT_READ|VM_PROT_WRITE);
zeropage((caddr_t)kva);
pmap_remove_mapping(pmap_kernel(), kva, PT_ENTRY_NULL,
PRM_TFLUSH|PRM_CFLUSH);
@@ -1766,8 +1768,9 @@ pmap_copy_page(src, dst)
#endif
skva = (vm_offset_t) CADDR1;
dkva = (vm_offset_t) CADDR2;
- pmap_enter(pmap_kernel(), skva, src, VM_PROT_READ, TRUE);
- pmap_enter(pmap_kernel(), dkva, dst, VM_PROT_READ|VM_PROT_WRITE, TRUE);
+ pmap_enter(pmap_kernel(), skva, src, VM_PROT_READ, TRUE, VM_PROT_READ);
+ pmap_enter(pmap_kernel(), dkva, dst, VM_PROT_READ|VM_PROT_WRITE, TRUE,
+ VM_PROT_READ|VM_PROT_WRITE);
copypage((caddr_t)skva, (caddr_t)dkva);
/* CADDR1 and CADDR2 are virtually contiguous */
pmap_remove(pmap_kernel(), skva, skva + (2 * NBPG));
@@ -2524,7 +2527,8 @@ pmap_enter_ptpage(pmap, va)
kpt_used_list = kpt;
ptpa = kpt->kpt_pa;
bzero((caddr_t)kpt->kpt_va, NBPG);
- pmap_enter(pmap, va, ptpa, VM_PROT_DEFAULT, TRUE);
+ pmap_enter(pmap, va, ptpa, VM_PROT_DEFAULT, TRUE,
+ VM_PROT_DEFAULT);
#ifdef DEBUG
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE)) {
int ix = pmap_ste(pmap, va) - pmap_ste(pmap, 0);
diff --git a/sys/arch/hp300/hp300/trap.c b/sys/arch/hp300/hp300/trap.c
index cdf04248bd3..b3606b10655 100644
--- a/sys/arch/hp300/hp300/trap.c
+++ b/sys/arch/hp300/hp300/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.14 1998/05/27 05:40:18 millert Exp $ */
+/* $OpenBSD: trap.c,v 1.15 1999/09/03 18:00:43 art Exp $ */
/* $NetBSD: trap.c,v 1.55 1997/07/08 16:56:36 kleink Exp $ */
/*
@@ -789,7 +789,8 @@ writeback(fp, docachepush)
*/
if (docachepush) {
pmap_enter(pmap_kernel(), (vm_offset_t)vmmap,
- trunc_page(f->f_fa), VM_PROT_WRITE, TRUE);
+ trunc_page(f->f_fa), VM_PROT_WRITE, TRUE, 0
+ VM_PROT_WRITE);
fa = (u_int)&vmmap[(f->f_fa & PGOFSET) & ~0xF];
bcopy((caddr_t)&f->f_pd0, (caddr_t)fa, 16);
DCFL(pmap_extract(pmap_kernel(), (vm_offset_t)fa));
diff --git a/sys/arch/hp300/hp300/vm_machdep.c b/sys/arch/hp300/hp300/vm_machdep.c
index 03ff82cbf4f..337b16b1743 100644
--- a/sys/arch/hp300/hp300/vm_machdep.c
+++ b/sys/arch/hp300/hp300/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.13 1999/08/17 10:32:16 niklas Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.14 1999/09/03 18:00:44 art Exp $ */
/* $NetBSD: vm_machdep.c,v 1.37 1997/05/26 00:27:43 thorpej Exp $ */
/*
@@ -227,7 +227,8 @@ pagemove(from, to, size)
pmap_remove(pmap_kernel(),
(vm_offset_t)from, (vm_offset_t)from + PAGE_SIZE);
pmap_enter(pmap_kernel(),
- (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 += PAGE_SIZE;
to += PAGE_SIZE;
size -= PAGE_SIZE;
@@ -322,7 +323,7 @@ vmapbuf(bp, sz)
if (pa == 0)
panic("vmapbuf: null page frame");
pmap_enter(vm_map_pmap(phys_map), kva, trunc_page(pa),
- VM_PROT_READ|VM_PROT_WRITE, TRUE);
+ VM_PROT_READ|VM_PROT_WRITE, TRUE, 0);
addr += PAGE_SIZE;
kva += PAGE_SIZE;
}
diff --git a/sys/arch/hppa/hppa/dma.c b/sys/arch/hppa/hppa/dma.c
index 76ee2bdfc6d..a6273074176 100644
--- a/sys/arch/hppa/hppa/dma.c
+++ b/sys/arch/hppa/hppa/dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dma.c,v 1.3 1999/07/12 17:43:40 mickey Exp $ */
+/* $OpenBSD: dma.c,v 1.4 1999/09/03 18:00:46 art Exp $ */
/*
* Copyright (c) 1998 Michael Shalayeff
@@ -174,7 +174,7 @@ _dmamem_alloc(v, size, alignment, boundary, segs, nsegs, rsegs, flags)
for (epa = size + (spa = kvtop((caddr_t)va)); spa < epa;
spa += NBPG, va += NBPG) {
pmap_enter(pmap_kernel(), va, spa,
- VM_PROT_READ | VM_PROT_WRITE, TRUE);
+ VM_PROT_READ | VM_PROT_WRITE, TRUE, 0);
pmap_changebit(spa, TLB_UNCACHEABLE, 0);
}
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c
index 23076e38d5d..d0fe3313c36 100644
--- a/sys/arch/hppa/hppa/machdep.c
+++ b/sys/arch/hppa/hppa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.12 1999/08/14 03:19:42 mickey Exp $ */
+/* $OpenBSD: machdep.c,v 1.13 1999/09/03 18:00:46 art Exp $ */
/*
* Copyright (c) 1998,1999 Michael Shalayeff
@@ -544,7 +544,9 @@ cpu_startup()
panic("cpu_startup: not enough memory for "
"buffer cache");
pmap_enter(kernel_map->pmap, curbuf,
- VM_PAGE_TO_PHYS(pg), VM_PROT_ALL, TRUE);
+ VM_PAGE_TO_PHYS(pg),
+ VM_PROT_READ|VM_PROT_WRITE, TRUE,
+ VM_PROT_READ|VM_PROT_WRITE);
curbuf += PAGE_SIZE;
curbufsize -= PAGE_SIZE;
}
@@ -964,7 +966,7 @@ bus_mem_add_mapping(bpa, size, cacheable, bshp)
for (; spa < epa; spa += NBPG, va += NBPG) {
pmap_enter(pmap_kernel(), va, spa,
- VM_PROT_READ | VM_PROT_WRITE, TRUE);
+ VM_PROT_READ | VM_PROT_WRITE, TRUE, 0);
if (!cacheable)
pmap_changebit(spa, TLB_UNCACHEABLE, ~0);
else
diff --git a/sys/arch/hppa/hppa/pmap.c b/sys/arch/hppa/hppa/pmap.c
index 2a4390dba9c..ab945e242f1 100644
--- a/sys/arch/hppa/hppa/pmap.c
+++ b/sys/arch/hppa/hppa/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.19 1999/08/03 15:35:23 mickey Exp $ */
+/* $OpenBSD: pmap.c,v 1.20 1999/09/03 18:00:47 art Exp $ */
/*
* Copyright (c) 1998,1999 Michael Shalayeff
@@ -1002,19 +1002,20 @@ pmap_destroy(pmap)
}
/*
- * pmap_enter(pmap, va, pa, prot, wired)
+ * pmap_enter(pmap, va, pa, prot, wired, access_type)
* Create a translation for the virtual address (va) to the physical
* address (pa) in the pmap with the protection requested. If the
* translation is wired then we can not allow a page fault to occur
* for this mapping.
*/
void
-pmap_enter(pmap, va, pa, prot, wired)
+pmap_enter(pmap, va, pa, prot, wired, access_type)
pmap_t pmap;
vaddr_t va;
paddr_t pa;
vm_prot_t prot;
boolean_t wired;
+ vm_prot_t access_type;
{
register struct pv_entry *pv, *ppv;
u_int tlbpage = tlbbtop(pa), tlbprot;
@@ -1169,7 +1170,7 @@ pmap_map(va, spa, epa, prot, wired)
#endif
while (spa < epa) {
- pmap_enter(pmap_kernel(), va, spa, prot, wired);
+ pmap_enter(pmap_kernel(), va, spa, prot, wired, 0);
va += NBPG;
spa += NBPG;
}
diff --git a/sys/arch/hppa/hppa/vm_machdep.c b/sys/arch/hppa/hppa/vm_machdep.c
index f96dea277f5..44c2a7b6386 100644
--- a/sys/arch/hppa/hppa/vm_machdep.c
+++ b/sys/arch/hppa/hppa/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.7 1999/08/17 10:32:16 niklas Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.8 1999/09/03 18:00:47 art Exp $ */
#include <sys/param.h>
#include <sys/systm.h>
@@ -77,8 +77,9 @@ pagemove(from, to, size)
pa = pmap_extract(pmap_kernel(), (vm_offset_t)from);
pmap_remove(pmap_kernel(),
(vm_offset_t)from, (vm_offset_t)from + PAGE_SIZE);
- pmap_enter(pmap_kernel(),
- (vm_offset_t)to, pa, VM_PROT_READ|VM_PROT_WRITE, 1);
+ pmap_enter(pmap_kernel(), (vm_offset_t)to, pa,
+ VM_PROT_READ|VM_PROT_WRITE, 1,
+ VM_PROT_READ|VM_PROT_WRITE);
from += PAGE_SIZE;
to += PAGE_SIZE;
size -= PAGE_SIZE;
@@ -203,7 +204,7 @@ vmapbuf(bp, len)
if (pa == 0)
panic("vmapbuf: null page frame");
pmap_enter(vm_map_pmap(phys_map), taddr, trunc_page(pa),
- VM_PROT_READ|VM_PROT_WRITE, TRUE);
+ VM_PROT_READ|VM_PROT_WRITE, TRUE, 0);
faddr += PAGE_SIZE;
taddr += PAGE_SIZE;
}
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index 825574d7c39..d77c4a24295 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.112 1999/08/20 10:33:34 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.113 1999/09/03 18:00:50 art Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -291,8 +291,10 @@ cpu_startup()
/* avail_end was pre-decremented in pmap_bootstrap to compensate */
for (i = 0; i < btoc(sizeof(struct msgbuf)); i++, pa += NBPG)
pmap_enter(pmap_kernel(),
- (vm_offset_t)((caddr_t)msgbufp + i * NBPG),
- pa, VM_PROT_ALL, TRUE);
+ (vm_offset_t)((caddr_t)msgbufp + i * NBPG), pa,
+ VM_PROT_READ|VM_PROT_WRITE, TRUE,
+ VM_PROT_READ|VM_PROT_WRITE);
+
msgbufmapped = 1;
/* Boot arguments are in page 1 */
@@ -300,8 +302,9 @@ cpu_startup()
pa = (vm_offset_t)bootargv;
for (i = 0; i < btoc(bootargc); i++, pa += NBPG)
pmap_enter(pmap_kernel(),
- (vm_offset_t)((caddr_t)bootargp + i * NBPG),
- pa, VM_PROT_READ|VM_PROT_WRITE, TRUE);
+ (vm_offset_t)((caddr_t)bootargp + i * NBPG), pa,
+ VM_PROT_READ|VM_PROT_WRITE, TRUE,
+ VM_PROT_READ|VM_PROT_WRITE);
} else
bootargp = NULL;
@@ -609,7 +612,8 @@ setup_buffers(maxaddr)
for (size = CLBYTES * (i < residual ? base + 1 : base);
size > 0; size -= NBPG, addr += NBPG) {
pmap_enter(pmap_kernel(), addr, pg->phys_addr,
- VM_PROT_READ|VM_PROT_WRITE, TRUE);
+ VM_PROT_READ|VM_PROT_WRITE, TRUE,
+ VM_PROT_READ|VM_PROT_WRITE);
pg = pg->pageq.tqe_next;
}
}
@@ -2368,7 +2372,8 @@ bus_mem_add_mapping(bpa, size, cacheable, bshp)
for (; pa < endpa; pa += NBPG, va += NBPG) {
pmap_enter(pmap_kernel(), va, pa,
- VM_PROT_READ | VM_PROT_WRITE, TRUE);
+ VM_PROT_READ | VM_PROT_WRITE, TRUE,
+ VM_PROT_READ | VM_PROT_WRITE);
if (!cacheable)
pmap_changebit(pa, PG_N, ~0);
else
@@ -2775,7 +2780,8 @@ _bus_dmamem_map(t, segs, nsegs, size, kvap, flags)
if (size == 0)
panic("_bus_dmamem_map: size botch");
pmap_enter(pmap_kernel(), va, addr,
- VM_PROT_READ | VM_PROT_WRITE, TRUE);
+ VM_PROT_READ | VM_PROT_WRITE, TRUE,
+ VM_PROT_READ | VM_PROT_WRITE);
}
}
diff --git a/sys/arch/i386/i386/mem.c b/sys/arch/i386/i386/mem.c
index c98ddeeb517..0beaea86984 100644
--- a/sys/arch/i386/i386/mem.c
+++ b/sys/arch/i386/i386/mem.c
@@ -1,5 +1,5 @@
/* $NetBSD: mem.c,v 1.31 1996/05/03 19:42:19 christos Exp $ */
-/* $OpenBSD: mem.c,v 1.11 1999/02/26 04:41:13 art Exp $ */
+/* $OpenBSD: mem.c,v 1.12 1999/09/03 18:00:51 art Exp $ */
/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1982, 1986, 1990, 1993
@@ -168,7 +168,7 @@ mmrw(dev, uio, flags)
v = uio->uio_offset;
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/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c
index ffe15058102..41edc83c84e 100644
--- a/sys/arch/i386/i386/pmap.c
+++ b/sys/arch/i386/i386/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.31 1999/08/25 09:13:53 ho Exp $ */
+/* $OpenBSD: pmap.c,v 1.32 1999/09/03 18:00:51 art Exp $ */
/* $NetBSD: pmap.c,v 1.36 1996/05/03 19:42:22 christos Exp $ */
/*
@@ -658,7 +658,7 @@ pmap_map(va, spa, epa, prot)
#endif
while (spa < epa) {
- pmap_enter(pmap_kernel(), va, spa, prot, FALSE);
+ pmap_enter(pmap_kernel(), va, spa, prot, FALSE, 0);
va += NBPG;
spa += NBPG;
}
@@ -1149,12 +1149,13 @@ pmap_protect(pmap, sva, eva, prot)
* insert this page into the given map NOW.
*/
void
-pmap_enter(pmap, va, pa, prot, wired)
+pmap_enter(pmap, va, pa, prot, wired, access_type)
register pmap_t pmap;
vm_offset_t va;
register vm_offset_t pa;
vm_prot_t prot;
boolean_t wired;
+ vm_prot_t access_type;
{
register pt_entry_t *pte;
register pt_entry_t npte;
diff --git a/sys/arch/i386/i386/pmap.old.c b/sys/arch/i386/i386/pmap.old.c
index 50fb4a90c3e..d23afcc7bde 100644
--- a/sys/arch/i386/i386/pmap.old.c
+++ b/sys/arch/i386/i386/pmap.old.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.old.c,v 1.31 1999/08/25 09:13:53 ho Exp $ */
+/* $OpenBSD: pmap.old.c,v 1.32 1999/09/03 18:00:51 art Exp $ */
/* $NetBSD: pmap.c,v 1.36 1996/05/03 19:42:22 christos Exp $ */
/*
@@ -658,7 +658,7 @@ pmap_map(va, spa, epa, prot)
#endif
while (spa < epa) {
- pmap_enter(pmap_kernel(), va, spa, prot, FALSE);
+ pmap_enter(pmap_kernel(), va, spa, prot, FALSE, 0);
va += NBPG;
spa += NBPG;
}
@@ -1149,12 +1149,13 @@ pmap_protect(pmap, sva, eva, prot)
* insert this page into the given map NOW.
*/
void
-pmap_enter(pmap, va, pa, prot, wired)
+pmap_enter(pmap, va, pa, prot, wired, access_type)
register pmap_t pmap;
vm_offset_t va;
register vm_offset_t pa;
vm_prot_t prot;
boolean_t wired;
+ vm_prot_t access_type;
{
register pt_entry_t *pte;
register pt_entry_t npte;
diff --git a/sys/arch/m68k/m68k/mappedcopy.c b/sys/arch/m68k/m68k/mappedcopy.c
index e2adb099ddd..420170fff2d 100644
--- a/sys/arch/m68k/m68k/mappedcopy.c
+++ b/sys/arch/m68k/m68k/mappedcopy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mappedcopy.c,v 1.1 1997/02/10 11:11:51 downsj Exp $ */
+/* $OpenBSD: mappedcopy.c,v 1.2 1999/09/03 18:01:04 art Exp $ */
/* $NetBSD: mappedcopy.c,v 1.1 1997/02/02 06:54:10 thorpej Exp $ */
/*
@@ -111,7 +111,8 @@ mappedcopyin(fromp, top, count)
if (upa == 0)
panic("mappedcopyin: null page frame");
len = min(count, (PAGE_SIZE - off));
- pmap_enter(pmap_kernel(), kva, upa, VM_PROT_READ, TRUE);
+ pmap_enter(pmap_kernel(), kva, upa, VM_PROT_READ, TRUE,
+ VM_PROT_READ);
if (len == PAGE_SIZE && alignable && off == 0)
copypage((caddr_t)kva, top);
else
@@ -162,7 +163,8 @@ mappedcopyout(fromp, top, count)
panic("mappedcopyout: null page frame");
len = min(count, (PAGE_SIZE - off));
pmap_enter(pmap_kernel(), kva, upa,
- VM_PROT_READ|VM_PROT_WRITE, TRUE);
+ VM_PROT_READ|VM_PROT_WRITE, TRUE,
+ VM_PROT_READ|VM_PROT_WRITE);
if (len == PAGE_SIZE && alignable && off == 0)
copypage(fromp, (caddr_t)kva);
else
diff --git a/sys/arch/mac68k/dev/nubus.c b/sys/arch/mac68k/dev/nubus.c
index aa959045288..e1cdf36c6ec 100644
--- a/sys/arch/mac68k/dev/nubus.c
+++ b/sys/arch/mac68k/dev/nubus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nubus.c,v 1.13 1999/04/24 06:39:40 downsj Exp $ */
+/* $OpenBSD: nubus.c,v 1.14 1999/09/03 18:01:09 art Exp $ */
/* $NetBSD: nubus.c,v 1.35 1997/04/22 20:20:32 scottr Exp $ */
/*
@@ -828,7 +828,8 @@ nubus_mapin(paddr, sz)
pmap_map((int)va, pa | pmt, pa + sz, VM_PROT_ALL);
#else
do {
- pmap_enter(pmap_kernel(), va, pa | pmt, VM_PROT_ALL, FALSE);
+ pmap_enter(pmap_kernel(), va, pa | pmt,
+ VM_PROT_READ|VM_PROT_WRITE, FALSE, 0);
va += NBPG;
pa += NBPG;
} while ((sz -= NBPG) > 0);
diff --git a/sys/arch/mac68k/mac68k/bus_space.c b/sys/arch/mac68k/mac68k/bus_space.c
index d73639eefd3..6e114b4c805 100644
--- a/sys/arch/mac68k/mac68k/bus_space.c
+++ b/sys/arch/mac68k/mac68k/bus_space.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_space.c,v 1.3 1999/04/24 06:39:41 downsj Exp $ */
+/* $OpenBSD: bus_space.c,v 1.4 1999/09/03 18:01:11 art Exp $ */
/* $NetBSD: bus_space.c,v 1.2 1998/04/24 05:27:24 scottr Exp $ */
/*-
@@ -186,7 +186,7 @@ bus_mem_add_mapping(bpa, size, flags, bshp)
for (; pa < endpa; pa += NBPG, va += NBPG) {
pmap_enter(pmap_kernel(), va, pa,
- VM_PROT_READ | VM_PROT_WRITE, TRUE);
+ VM_PROT_READ | VM_PROT_WRITE, TRUE, 0);
if (!(flags & BUS_SPACE_MAP_CACHEABLE))
pmap_changebit(pa, PG_CI, TRUE);
}
diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c
index d8360f0934f..98a37234efb 100644
--- a/sys/arch/mac68k/mac68k/machdep.c
+++ b/sys/arch/mac68k/mac68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.62 1999/06/11 06:19:08 downsj Exp $ */
+/* $OpenBSD: machdep.c,v 1.63 1999/09/03 18:01:12 art Exp $ */
/* $NetBSD: machdep.c,v 1.134 1997/02/14 06:15:30 scottr Exp $ */
/*
@@ -312,7 +312,9 @@ cpu_startup(void)
*/
for (i = 0; i < btoc(sizeof(struct msgbuf)); i++)
pmap_enter(pmap_kernel(), (vm_offset_t) msgbufp,
- high[numranges - 1] + i * NBPG, VM_PROT_ALL, TRUE);
+ high[numranges - 1] + i * NBPG,
+ VM_PROT_READ|VM_PROT_WRITE, TRUE,
+ VM_PROT_READ|VM_PROT_WRITE);
msgbufmapped = 1;
/*
@@ -841,7 +843,7 @@ dumpsys()
maddr = h->ram_segs[seg].start;
}
pmap_enter(pmap_kernel(), (vm_offset_t)vmmap, maddr,
- VM_PROT_READ, TRUE);
+ VM_PROT_READ, TRUE, VM_PROT_READ);
error = (*dump)(dumpdev, blkno, vmmap, NBPG);
bad:
diff --git a/sys/arch/mac68k/mac68k/mem.c b/sys/arch/mac68k/mac68k/mem.c
index 9f5f831581f..006e78c9dd8 100644
--- a/sys/arch/mac68k/mac68k/mem.c
+++ b/sys/arch/mac68k/mac68k/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.7 1999/04/24 06:39:41 downsj Exp $ */
+/* $OpenBSD: mem.c,v 1.8 1999/09/03 18:01:14 art Exp $ */
/* $NetBSD: mem.c,v 1.11 1996/05/05 06:18:41 briggs Exp $ */
/*
@@ -133,7 +133,7 @@ mmrw(dev, uio, flags)
v = uio->uio_offset;
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/mac68k/mac68k/pmap.c b/sys/arch/mac68k/mac68k/pmap.c
index e9d4115849f..b28c0676acc 100644
--- a/sys/arch/mac68k/mac68k/pmap.c
+++ b/sys/arch/mac68k/mac68k/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.15 1999/07/18 18:00:05 deraadt Exp $ */
+/* $OpenBSD: pmap.c,v 1.16 1999/09/03 18:01:14 art Exp $ */
/* $NetBSD: pmap.c,v 1.28 1996/10/21 05:42:27 scottr Exp $ */
/*
@@ -634,7 +634,7 @@ pmap_map(va, spa, epa, prot)
#endif
while (spa < epa) {
- pmap_enter(pmap_kernel(), va, spa, prot, FALSE);
+ pmap_enter(pmap_kernel(), va, spa, prot, FALSE, 0);
va += NBPG;
spa += NBPG;
}
@@ -1059,12 +1059,13 @@ extern vm_offset_t tmp_vpages[];
* insert this page into the given map NOW.
*/
void
-pmap_enter(pmap, va, pa, prot, wired)
+pmap_enter(pmap, va, pa, prot, wired, access_type)
register pmap_t pmap;
vm_offset_t va;
register vm_offset_t pa;
vm_prot_t prot;
boolean_t wired;
+ vm_prot_t access_type;
{
register pt_entry_t *pte;
register int npte;
@@ -1458,7 +1459,8 @@ pmap_zero_page(phys)
printf("pmap_zero_page(%lx)\n", phys);
#endif
kva = (vm_offset_t) CADDR1;
- pmap_enter(pmap_kernel(), kva, phys, VM_PROT_READ|VM_PROT_WRITE, TRUE);
+ pmap_enter(pmap_kernel(), kva, phys, VM_PROT_READ|VM_PROT_WRITE, TRUE,
+ 0);
zeropage((caddr_t)kva);
pmap_remove_mapping(pmap_kernel(), kva, PT_ENTRY_NULL,
PRM_TFLUSH|PRM_CFLUSH);
@@ -1483,8 +1485,9 @@ pmap_copy_page(src, dst)
#endif
skva = (vm_offset_t) CADDR1;
dkva = (vm_offset_t) CADDR2;
- pmap_enter(pmap_kernel(), skva, src, VM_PROT_READ, TRUE);
- pmap_enter(pmap_kernel(), dkva, dst, VM_PROT_READ|VM_PROT_WRITE, TRUE);
+ pmap_enter(pmap_kernel(), skva, src, VM_PROT_READ, TRUE, 0);
+ pmap_enter(pmap_kernel(), dkva, dst, VM_PROT_READ|VM_PROT_WRITE, TRUE,
+ 0);
copypage((caddr_t)skva, (caddr_t)dkva);
/* CADDR1 and CADDR2 are virtually contiguous */
pmap_remove(pmap_kernel(), skva, skva + (2 * NBPG));
@@ -2137,7 +2140,8 @@ pmap_enter_ptpage(pmap, va)
kpt_used_list = kpt;
ptpa = kpt->kpt_pa;
bzero((caddr_t)kpt->kpt_va, NBPG);
- pmap_enter(pmap, va, ptpa, VM_PROT_DEFAULT, TRUE);
+ pmap_enter(pmap, va, ptpa, VM_PROT_DEFAULT, TRUE,
+ VM_PROT_DEFAULT);
#ifdef DEBUG
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE)) {
int ix = pmap_ste(pmap, va) - pmap_ste(pmap, 0);
diff --git a/sys/arch/mac68k/mac68k/trap.c b/sys/arch/mac68k/mac68k/trap.c
index c6e735d3181..6fe475a6111 100644
--- a/sys/arch/mac68k/mac68k/trap.c
+++ b/sys/arch/mac68k/mac68k/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.15 1999/01/11 05:11:37 millert Exp $ */
+/* $OpenBSD: trap.c,v 1.16 1999/09/03 18:01:15 art Exp $ */
/* $NetBSD: trap.c,v 1.46 1997/04/07 22:54:44 scottr Exp $ */
/*
@@ -710,7 +710,8 @@ writeback(fp, docachepush)
*/
if (docachepush) {
pmap_enter(pmap_kernel(), (vm_offset_t)vmmap,
- trunc_page(f->f_fa), VM_PROT_WRITE, TRUE);
+ trunc_page(f->f_fa), VM_PROT_WRITE, TRUE,
+ VM_PROT_WRITE);
fa = (u_int)&vmmap[(f->f_fa & PGOFSET) & ~0xF];
bcopy((caddr_t)&f->f_pd0, (caddr_t)fa, 16);
DCFL(pmap_extract(pmap_kernel(), (vm_offset_t)fa));
diff --git a/sys/arch/mac68k/mac68k/vm_machdep.c b/sys/arch/mac68k/mac68k/vm_machdep.c
index b4ac53a2855..9c3bec98e5f 100644
--- a/sys/arch/mac68k/mac68k/vm_machdep.c
+++ b/sys/arch/mac68k/mac68k/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.12 1999/08/17 10:32:17 niklas Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.13 1999/09/03 18:01:15 art Exp $ */
/* $NetBSD: vm_machdep.c,v 1.21 1996/09/16 18:00:31 scottr Exp $ */
/*
@@ -264,7 +264,8 @@ pagemove(from, to, size)
pmap_remove(pmap_kernel(),
(vm_offset_t)from, (vm_offset_t) from + PAGE_SIZE);
pmap_enter(pmap_kernel(),
- (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 += PAGE_SIZE;
to += PAGE_SIZE;
size -= PAGE_SIZE;
diff --git a/sys/arch/mips/mips/vm_machdep.c b/sys/arch/mips/mips/vm_machdep.c
index 8f8aaba4e5f..72c64feb844 100644
--- a/sys/arch/mips/mips/vm_machdep.c
+++ b/sys/arch/mips/mips/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.6 1999/08/17 10:32:17 niklas Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.7 1999/09/03 18:01:18 art Exp $ */
/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1992, 1993
@@ -317,7 +317,7 @@ vmapbuf(bp, len)
if (pa == 0)
panic("vmapbuf: null page frame");
pmap_enter(vm_map_pmap(phys_map), kva, trunc_page(pa),
- VM_PROT_READ|VM_PROT_WRITE, TRUE);
+ VM_PROT_READ|VM_PROT_WRITE, TRUE, 0);
addr += PAGE_SIZE;
kva += PAGE_SIZE;
}
diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c
index 96564c7b469..5d9f4b2f353 100644
--- a/sys/arch/mvme68k/mvme68k/machdep.c
+++ b/sys/arch/mvme68k/mvme68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.27 1999/05/24 23:09:04 jason Exp $ */
+/* $OpenBSD: machdep.c,v 1.28 1999/09/03 18:01:21 art Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -227,7 +227,8 @@ cpu_startup()
*/
for (i = 0; i < btoc(sizeof (struct msgbuf)); i++)
pmap_enter(pmap_kernel(), (vm_offset_t)msgbufp,
- avail_end + i * NBPG, VM_PROT_ALL, TRUE);
+ avail_end + i * NBPG, VM_PROT_READ|VM_PROT_WRITE, TRUE,
+ VM_PROT_READ|VM_PROT_WRITE);
msgbufmapped = 1;
/*
diff --git a/sys/arch/mvme68k/mvme68k/mem.c b/sys/arch/mvme68k/mvme68k/mem.c
index c078c29e414..1208b59d1fa 100644
--- a/sys/arch/mvme68k/mvme68k/mem.c
+++ b/sys/arch/mvme68k/mvme68k/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.6 1998/08/31 17:42:35 millert Exp $ */
+/* $OpenBSD: mem.c,v 1.7 1999/09/03 18:01:22 art Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -162,7 +162,7 @@ mmrw(dev, uio, flags)
#endif
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/mvme68k/mvme68k/pmap.c b/sys/arch/mvme68k/mvme68k/pmap.c
index 402bc070647..d28b0a87d3b 100644
--- a/sys/arch/mvme68k/mvme68k/pmap.c
+++ b/sys/arch/mvme68k/mvme68k/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.11 1999/07/18 18:00:06 deraadt Exp $ */
+/* $OpenBSD: pmap.c,v 1.12 1999/09/03 18:01:23 art Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -751,7 +751,7 @@ pmap_map(va, spa, epa, prot)
#endif
while (spa < epa) {
- pmap_enter(pmap_kernel(), va, spa, prot, FALSE);
+ pmap_enter(pmap_kernel(), va, spa, prot, FALSE, 0);
va += NBPG;
spa += NBPG;
}
@@ -1156,12 +1156,13 @@ pmap_protect(pmap, sva, eva, prot)
* insert this page into the given map NOW.
*/
void
-pmap_enter(pmap, va, pa, prot, wired)
+pmap_enter(pmap, va, pa, prot, wired, access_type)
register pmap_t pmap;
vm_offset_t va;
register vm_offset_t pa;
vm_prot_t prot;
boolean_t wired;
+ vm_prot_t access_type;
{
register pt_entry_t *pte;
register int npte;
@@ -1699,7 +1700,8 @@ pmap_zero_page(phys)
printf("pmap_zero_page(%x)\n", phys);
#endif
kva = (vm_offset_t) CADDR1;
- pmap_enter(pmap_kernel(), kva, phys, VM_PROT_READ|VM_PROT_WRITE, TRUE);
+ pmap_enter(pmap_kernel(), kva, phys, VM_PROT_READ|VM_PROT_WRITE, TRUE,
+ 0);
zeropage((caddr_t)kva);
pmap_remove_mapping(pmap_kernel(), kva, PT_ENTRY_NULL,
PRM_TFLUSH|PRM_CFLUSH);
@@ -1731,8 +1733,9 @@ pmap_copy_page(src, dst)
#endif
skva = (vm_offset_t) CADDR1;
dkva = (vm_offset_t) CADDR2;
- pmap_enter(pmap_kernel(), skva, src, VM_PROT_READ, TRUE);
- pmap_enter(pmap_kernel(), dkva, dst, VM_PROT_READ|VM_PROT_WRITE, TRUE);
+ pmap_enter(pmap_kernel(), skva, src, VM_PROT_READ, TRUE, 0);
+ pmap_enter(pmap_kernel(), dkva, dst, VM_PROT_READ|VM_PROT_WRITE, TRUE,
+ 0);
copypage((caddr_t)skva, (caddr_t)dkva);
/* CADDR1 and CADDR2 are virtually contiguous */
pmap_remove(pmap_kernel(), skva, skva + (2 * NBPG));
@@ -2418,7 +2421,8 @@ pmap_enter_ptpage(pmap, va)
kpt_used_list = kpt;
ptpa = kpt->kpt_pa;
bzero((caddr_t)kpt->kpt_va, NBPG);
- pmap_enter(pmap, va, ptpa, VM_PROT_DEFAULT, TRUE);
+ pmap_enter(pmap, va, ptpa, VM_PROT_DEFAULT, TRUE,
+ VM_PROT_DEFAULT);
#ifdef DEBUG
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE)) {
int ix = pmap_ste(pmap, va) - pmap_ste(pmap, 0);
diff --git a/sys/arch/mvme68k/mvme68k/trap.c b/sys/arch/mvme68k/mvme68k/trap.c
index a884829bd9f..751d5262f7a 100644
--- a/sys/arch/mvme68k/mvme68k/trap.c
+++ b/sys/arch/mvme68k/mvme68k/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.20 1999/06/06 15:38:34 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.21 1999/09/03 18:01:23 art Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -720,7 +720,8 @@ writeback(fp, docachepush)
*/
if (docachepush) {
pmap_enter(pmap_kernel(), (vm_offset_t)vmmap,
- trunc_page(f->f_fa), VM_PROT_WRITE, TRUE);
+ trunc_page(f->f_fa), VM_PROT_WRITE, TRUE,
+ VM_PROT_WRITE);
fa = (u_int)&vmmap[(f->f_fa & PGOFSET) & ~0xF];
bcopy((caddr_t)&f->f_pd0, (caddr_t)fa, 16);
DCFL(pmap_extract(pmap_kernel(), (vm_offset_t)fa));
diff --git a/sys/arch/mvme68k/mvme68k/vm_machdep.c b/sys/arch/mvme68k/mvme68k/vm_machdep.c
index d15397fb852..e3d08aa8a75 100644
--- a/sys/arch/mvme68k/mvme68k/vm_machdep.c
+++ b/sys/arch/mvme68k/mvme68k/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.12 1999/08/17 10:32:17 niklas Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.13 1999/09/03 18:01:24 art Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -184,7 +184,8 @@ pagemove(from, to, size)
pmap_remove(pmap_kernel(),
(vm_offset_t)from, (vm_offset_t)from + PAGE_SIZE);
pmap_enter(pmap_kernel(),
- (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 += PAGE_SIZE;
to += PAGE_SIZE;
size -= PAGE_SIZE;
@@ -293,7 +294,7 @@ vmapbuf(bp, siz)
if (pa == 0)
panic("vmapbuf: null page frame");
pmap_enter(vm_map_pmap(phys_map), kva, trunc_page(pa),
- VM_PROT_READ|VM_PROT_WRITE, TRUE);
+ VM_PROT_READ|VM_PROT_WRITE, TRUE, 0);
addr += PAGE_SIZE;
kva += PAGE_SIZE;
}
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;
diff --git a/sys/arch/pmax/pmax/pmap.c b/sys/arch/pmax/pmax/pmap.c
index efed1719d62..dd3a70d283c 100644
--- a/sys/arch/pmax/pmax/pmap.c
+++ b/sys/arch/pmax/pmax/pmap.c
@@ -811,12 +811,13 @@ pmap_page_cache(pa,mode)
* insert this page into the given map NOW.
*/
void
-pmap_enter(pmap, va, pa, prot, wired)
+pmap_enter(pmap, va, pa, prot, wired, access_type)
register pmap_t pmap;
vm_offset_t va;
register vm_offset_t pa;
vm_prot_t prot;
boolean_t wired;
+ vm_prot_t access_type;
{
register pt_entry_t *pte;
register u_int npte;
diff --git a/sys/arch/pmax/pmax/vm_machdep.c b/sys/arch/pmax/pmax/vm_machdep.c
index 421efb319ca..f6d106324b0 100644
--- a/sys/arch/pmax/pmax/vm_machdep.c
+++ b/sys/arch/pmax/pmax/vm_machdep.c
@@ -314,7 +314,7 @@ vmapbuf(bp, len)
if (pa == 0)
panic("vmapbuf: null page frame");
pmap_enter(vm_map_pmap(phys_map), taddr, trunc_page(pa),
- VM_PROT_READ|VM_PROT_WRITE, TRUE);
+ VM_PROT_READ|VM_PROT_WRITE, TRUE, 0);
faddr += PAGE_SIZE;
taddr += PAGE_SIZE;
}
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;
}
diff --git a/sys/arch/sparc/include/pmap.h b/sys/arch/sparc/include/pmap.h
index 59354a85bcf..eeba342568e 100644
--- a/sys/arch/sparc/include/pmap.h
+++ b/sys/arch/sparc/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.10 1999/07/09 21:33:37 art Exp $ */
+/* $OpenBSD: pmap.h,v 1.11 1999/09/03 18:01:55 art Exp $ */
/* $NetBSD: pmap.h,v 1.30 1997/08/04 20:00:47 pk Exp $ */
/*
@@ -284,7 +284,7 @@ void pmap_clear_modify4_4c __P((paddr_t pa));
void pmap_clear_reference4_4c __P((paddr_t pa));
void pmap_copy_page4_4c __P((paddr_t, paddr_t));
void pmap_enter4_4c __P((pmap_t, vaddr_t, paddr_t, vm_prot_t,
- boolean_t));
+ boolean_t, vm_prot_t));
paddr_t pmap_extract4_4c __P((pmap_t, vaddr_t));
boolean_t pmap_is_modified4_4c __P((paddr_t pa));
boolean_t pmap_is_referenced4_4c __P((paddr_t pa));
@@ -301,7 +301,7 @@ void pmap_clear_modify4m __P((paddr_t pa));
void pmap_clear_reference4m __P((paddr_t pa));
void pmap_copy_page4m __P((paddr_t, paddr_t));
void pmap_enter4m __P((pmap_t, vaddr_t, paddr_t, vm_prot_t,
- boolean_t));
+ boolean_t, vm_prot_t));
paddr_t pmap_extract4m __P((pmap_t, vaddr_t));
boolean_t pmap_is_modified4m __P((paddr_t pa));
boolean_t pmap_is_referenced4m __P((paddr_t pa));
@@ -345,7 +345,7 @@ extern void (*pmap_clear_modify_p) __P((paddr_t pa));
extern void (*pmap_clear_reference_p) __P((paddr_t pa));
extern void (*pmap_copy_page_p) __P((paddr_t, paddr_t));
extern void (*pmap_enter_p) __P((pmap_t, vaddr_t, paddr_t,
- vm_prot_t, boolean_t));
+ vm_prot_t, boolean_t, vm_prot_t));
extern paddr_t (*pmap_extract_p) __P((pmap_t, vaddr_t));
extern boolean_t (*pmap_is_modified_p) __P((paddr_t pa));
extern boolean_t (*pmap_is_referenced_p) __P((paddr_t pa));
diff --git a/sys/arch/sparc/sparc/autoconf.c b/sys/arch/sparc/sparc/autoconf.c
index a579bd430d5..68afc63f0d8 100644
--- a/sys/arch/sparc/sparc/autoconf.c
+++ b/sys/arch/sparc/sparc/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.30 1999/03/17 22:56:24 deraadt Exp $ */
+/* $OpenBSD: autoconf.c,v 1.31 1999/09/03 18:01:57 art Exp $ */
/* $NetBSD: autoconf.c,v 1.73 1997/07/29 09:41:53 fair Exp $ */
/*
@@ -361,7 +361,8 @@ bootstrap()
/* Map Interrupt Enable Register */
pmap_enter(pmap_kernel(), INTRREG_VA,
INT_ENABLE_REG_PHYSADR | PMAP_NC | PMAP_OBIO,
- VM_PROT_READ | VM_PROT_WRITE, 1);
+ VM_PROT_READ | VM_PROT_WRITE, 1,
+ VM_PROT_READ | VM_PROT_WRITE);
/* Disable all interrupts */
*((unsigned char *)INTRREG_VA) = 0;
}
diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c
index 0264cba6162..94f0e43ea16 100644
--- a/sys/arch/sparc/sparc/machdep.c
+++ b/sys/arch/sparc/sparc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.39 1999/08/24 09:54:55 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.40 1999/09/03 18:01:58 art Exp $ */
/* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */
/*
@@ -250,7 +250,8 @@ cpu_startup()
panic("cpu_startup: "
"not enough RAM for buffer cache");
pmap_enter(kernel_map->pmap, curbuf,
- VM_PAGE_TO_PHYS(pg), VM_PROT_ALL, TRUE);
+ VM_PAGE_TO_PHYS(pg), VM_PROT_READ | VM_PROT_WRITE,
+ TRUE, VM_PROT_READ | VM_PROT_WRITE);
curbuf += PAGE_SIZE;
curbufsize -= PAGE_SIZE;
}
@@ -386,7 +387,8 @@ cpu_startup()
* fix message buffer mapping, note phys addr of msgbuf is 0
*/
- pmap_enter(pmap_kernel(), MSGBUF_VA, 0x0, VM_PROT_READ|VM_PROT_WRITE, 1);
+ pmap_enter(pmap_kernel(), MSGBUF_VA, 0x0, VM_PROT_READ|VM_PROT_WRITE,
+ TRUE, VM_PROT_READ | VM_PROT_WRITE);
if (CPU_ISSUN4)
msgbufp = (struct msgbuf *)(MSGBUF_VA + 4096);
else
@@ -1082,7 +1084,7 @@ mapdev(phys, virt, offset, size)
do {
pmap_enter(pmap_kernel(), v, pa | pmtype | PMAP_NC,
- VM_PROT_READ | VM_PROT_WRITE, 1);
+ VM_PROT_READ | VM_PROT_WRITE, 1, 0);
v += PAGE_SIZE;
pa += PAGE_SIZE;
} while ((size -= PAGE_SIZE) > 0);
diff --git a/sys/arch/sparc/sparc/mem.c b/sys/arch/sparc/sparc/mem.c
index c92224798ad..c54ea77c0d7 100644
--- a/sys/arch/sparc/sparc/mem.c
+++ b/sys/arch/sparc/sparc/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.6 1999/07/09 21:30:02 art Exp $ */
+/* $OpenBSD: mem.c,v 1.7 1999/09/03 18:01:59 art Exp $ */
/* $NetBSD: mem.c,v 1.13 1996/03/30 21:12:16 christos Exp $ */
/*
@@ -141,7 +141,7 @@ mmrw(dev, uio, flags)
}
pmap_enter(pmap_kernel(), (vaddr_t)vmmap,
trunc_page(pa), 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/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c
index f33e135cbea..1867c14bcff 100644
--- a/sys/arch/sparc/sparc/pmap.c
+++ b/sys/arch/sparc/sparc/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.31 1999/08/20 09:30:55 art Exp $ */
+/* $OpenBSD: pmap.c,v 1.32 1999/09/03 18:01:59 art Exp $ */
/* $NetBSD: pmap.c,v 1.118 1998/05/19 19:00:18 thorpej Exp $ */
/*
@@ -493,7 +493,7 @@ void (*pmap_clear_modify_p) __P((paddr_t pa));
void (*pmap_clear_reference_p) __P((paddr_t pa));
void (*pmap_copy_page_p) __P((paddr_t, paddr_t));
void (*pmap_enter_p) __P((pmap_t, vaddr_t, paddr_t, vm_prot_t,
- boolean_t));
+ boolean_t, vm_prot_t));
paddr_t (*pmap_extract_p) __P((pmap_t, vaddr_t));
boolean_t (*pmap_is_modified_p) __P((paddr_t pa));
boolean_t (*pmap_is_referenced_p) __P((paddr_t pa));
@@ -3588,7 +3588,8 @@ pass2:
/* Map this piece of pv_table[] */
for (va = sva; va < eva; va += PAGE_SIZE) {
pmap_enter(pmap_kernel(), va, pa,
- VM_PROT_READ|VM_PROT_WRITE, 1);
+ VM_PROT_READ|VM_PROT_WRITE, 1,
+ VM_PROT_READ|VM_PROT_WRITE);
pa += PAGE_SIZE;
}
bzero((caddr_t)sva, eva - sva);
@@ -3624,7 +3625,7 @@ pmap_map(va, pa, endpa, prot)
int pgsize = PAGE_SIZE;
while (pa < endpa) {
- pmap_enter(pmap_kernel(), va, pa, prot, 1);
+ pmap_enter(pmap_kernel(), va, pa, prot, 1, 0);
va += pgsize;
pa += pgsize;
}
@@ -5110,12 +5111,13 @@ out:
#if defined(SUN4) || defined(SUN4C)
void
-pmap_enter4_4c(pm, va, pa, prot, wired)
+pmap_enter4_4c(pm, va, pa, prot, wired, access_prot)
struct pmap *pm;
vaddr_t va;
paddr_t pa;
vm_prot_t prot;
int wired;
+ vm_prot_t access_prot;
{
struct pvlist *pv;
int pteproto, ctx;
@@ -5477,12 +5479,13 @@ printf("%s[%d]: pmap_enu: changing existing va(0x%x)=>pa entry\n",
*/
void
-pmap_enter4m(pm, va, pa, prot, wired)
+pmap_enter4m(pm, va, pa, prot, wired, access_prot)
struct pmap *pm;
vaddr_t va;
paddr_t pa;
vm_prot_t prot;
int wired;
+ vm_prot_t access_prot;
{
struct pvlist *pv;
int pteproto, ctx;
@@ -5996,7 +5999,7 @@ pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr)
(pte & PPROT_WRITE)
? (VM_PROT_WRITE | VM_PROT_READ)
: VM_PROT_READ,
- 0);
+ 0, 0);
src_addr += NBPG;
dst_addr += NBPG;
}
diff --git a/sys/arch/sparc/sparc/vm_machdep.c b/sys/arch/sparc/sparc/vm_machdep.c
index 19be99b222b..2830cfa2045 100644
--- a/sys/arch/sparc/sparc/vm_machdep.c
+++ b/sys/arch/sparc/sparc/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.10 1999/08/17 10:32:18 niklas Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.11 1999/09/03 18:02:00 art Exp $ */
/* $NetBSD: vm_machdep.c,v 1.30 1997/03/10 23:55:40 pk Exp $ */
/*
@@ -88,7 +88,8 @@ pagemove(from, to, size)
pmap_remove(pmap_kernel(),
(vaddr_t)from, (vaddr_t)from + PAGE_SIZE);
pmap_enter(pmap_kernel(),
- (vaddr_t)to, pa, VM_PROT_READ|VM_PROT_WRITE, 1);
+ (vaddr_t)to, pa, VM_PROT_READ | VM_PROT_WRITE, 1,
+ VM_PROT_READ | VM_PROT_WRITE);
from += PAGE_SIZE;
to += PAGE_SIZE;
size -= PAGE_SIZE;
@@ -215,9 +216,9 @@ dvma_mapin(map, va, len, canwait)
pa |= PG_IOC;
#endif
#endif
- pmap_enter(pmap_kernel(), tva,
- pa | PMAP_NC,
- VM_PROT_READ|VM_PROT_WRITE, 1);
+ pmap_enter(pmap_kernel(), tva, pa | PMAP_NC,
+ VM_PROT_READ | VM_PROT_WRITE, 1,
+ 0);
}
tva += PAGE_SIZE;
@@ -306,9 +307,8 @@ vmapbuf(bp, sz)
* pmap_enter distributes this mapping to all
* contexts... maybe we should avoid this extra work
*/
- pmap_enter(pmap_kernel(), kva,
- pa | PMAP_NC,
- VM_PROT_READ|VM_PROT_WRITE, 1);
+ pmap_enter(pmap_kernel(), kva, pa | PMAP_NC,
+ VM_PROT_READ | VM_PROT_WRITE, 1, 0);
addr += PAGE_SIZE;
kva += PAGE_SIZE;
diff --git a/sys/uvm/uvm_device.c b/sys/uvm/uvm_device.c
index b0fea4ff884..c8bdeb9435b 100644
--- a/sys/uvm/uvm_device.c
+++ b/sys/uvm/uvm_device.c
@@ -474,7 +474,8 @@ udv_fault(ufi, vaddr, pps, npages, centeridx, fault_type, access_type, flags)
UVMHIST_LOG(maphist,
" MAPPING: device: pm=0x%x, va=0x%x, pa=0x%x, at=%d",
ufi->orig_map->pmap, curr_va, (int)paddr, access_type);
- pmap_enter(ufi->orig_map->pmap, curr_va, paddr, access_type, 0);
+ pmap_enter(ufi->orig_map->pmap, curr_va, paddr, access_type, 0,
+ access_type);
}
diff --git a/sys/uvm/uvm_fault.c b/sys/uvm/uvm_fault.c
index f82f5cd0c5f..d05c5c30282 100644
--- a/sys/uvm/uvm_fault.c
+++ b/sys/uvm/uvm_fault.c
@@ -821,7 +821,7 @@ ReFault:
VM_PAGE_TO_PHYS(anon->u.an_page),
(anon->an_ref > 1) ? (enter_prot & ~VM_PROT_WRITE) :
enter_prot,
- (ufi.entry->wired_count != 0));
+ (ufi.entry->wired_count != 0), 0);
}
simple_unlock(&anon->an_lock);
}
@@ -947,7 +947,7 @@ ReFault:
uvmexp.fltnomap++;
pmap_enter(ufi.orig_map->pmap, currva,
VM_PAGE_TO_PHYS(pages[lcv]),
- enter_prot & MASK(ufi.entry), wired);
+ enter_prot & MASK(ufi.entry), wired, 0);
/*
* NOTE: page can't be PG_WANTED or PG_RELEASED
@@ -1202,7 +1202,7 @@ ReFault:
UVMHIST_LOG(maphist, " MAPPING: anon: pm=0x%x, va=0x%x, pg=0x%x",
ufi.orig_map->pmap, ufi.orig_rvaddr, pg, 0);
pmap_enter(ufi.orig_map->pmap, ufi.orig_rvaddr, VM_PAGE_TO_PHYS(pg),
- enter_prot, wired);
+ enter_prot, wired, access_type);
/*
* ... and update the page queues.
@@ -1637,7 +1637,7 @@ Case2:
" MAPPING: case2: pm=0x%x, va=0x%x, pg=0x%x, promote=%d",
ufi.orig_map->pmap, ufi.orig_rvaddr, pg, promote);
pmap_enter(ufi.orig_map->pmap, ufi.orig_rvaddr, VM_PAGE_TO_PHYS(pg),
- enter_prot, wired);
+ enter_prot, wired, access_type);
uvm_lock_pageq();
diff --git a/sys/uvm/uvm_glue.c b/sys/uvm/uvm_glue.c
index d32d222a7fa..2467564f33e 100644
--- a/sys/uvm/uvm_glue.c
+++ b/sys/uvm/uvm_glue.c
@@ -208,7 +208,7 @@ uvm_chgkprot(addr, len, rw)
pa = pmap_extract(pmap_kernel(), sva|1);
if (pa == 0)
panic("chgkprot: invalid page");
- pmap_enter(pmap_kernel(), sva, pa&~1, prot, TRUE);
+ pmap_enter(pmap_kernel(), sva, pa&~1, prot, TRUE, 0);
}
}
#endif
diff --git a/sys/uvm/uvm_km.c b/sys/uvm/uvm_km.c
index 2e0ece879f7..a908f8f53aa 100644
--- a/sys/uvm/uvm_km.c
+++ b/sys/uvm/uvm_km.c
@@ -729,7 +729,7 @@ uvm_km_kmemalloc(map, obj, size, flags)
pmap_kenter_pa(loopva, VM_PAGE_TO_PHYS(pg), VM_PROT_ALL);
#else
pmap_enter(map->pmap, loopva, VM_PAGE_TO_PHYS(pg),
- UVM_PROT_ALL, TRUE);
+ UVM_PROT_ALL, TRUE, VM_PROT_READ | VM_PROT_WRITE);
#endif
loopva += PAGE_SIZE;
offset += PAGE_SIZE;
@@ -857,13 +857,13 @@ uvm_km_alloc1(map, size, zeroit)
continue;
}
- /* map it in */
-#if defined(PMAP_NEW)
- pmap_kenter_pa(loopva, VM_PAGE_TO_PHYS(pg), UVM_PROT_ALL);
-#else
- pmap_enter(map->pmap, loopva, VM_PAGE_TO_PHYS(pg),
- UVM_PROT_ALL, TRUE);
-#endif
+ /*
+ * map it in; note we're never called with an intrsafe
+ * object, so we always use regular old pmap_enter().
+ */
+ pmap_enter(map->pmap, loopva, VM_PAGE_TO_PHYS(pg),
+ UVM_PROT_ALL, TRUE, VM_PROT_READ|VM_PROT_WRITE);
+
loopva += PAGE_SIZE;
offset += PAGE_SIZE;
size -= PAGE_SIZE;
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;
}
diff --git a/sys/uvm/uvm_pager.c b/sys/uvm/uvm_pager.c
index be91fbf83e0..c8050983dec 100644
--- a/sys/uvm/uvm_pager.c
+++ b/sys/uvm/uvm_pager.c
@@ -125,10 +125,8 @@ uvm_pagermapin(pps, npages, aiop, waitf)
vsize_t size;
vaddr_t kva;
struct uvm_aiodesc *aio;
-#if !defined(PMAP_NEW)
vaddr_t cva;
struct vm_page *pp;
-#endif
UVMHIST_FUNC("uvm_pagermapin"); UVMHIST_CALLED(maphist);
UVMHIST_LOG(maphist,"(pps=0x%x, npages=%d, aiop=0x%x, waitf=%d)",
@@ -163,16 +161,6 @@ ReStart:
goto ReStart;
}
-#if defined(PMAP_NEW)
- /*
- * XXX: (ab)using the pmap module to store state info for us.
- * (pmap stores the PAs... we fetch them back later and convert back
- * to pages with PHYS_TO_VM_PAGE).
- */
- pmap_kenter_pgs(kva, pps, npages);
-
-#else /* PMAP_NEW */
-
/* got it */
for (cva = kva ; size != 0 ; size -= PAGE_SIZE, cva += PAGE_SIZE) {
pp = *pps++;
@@ -182,11 +170,10 @@ ReStart:
#endif
pmap_enter(vm_map_pmap(pager_map), cva, VM_PAGE_TO_PHYS(pp),
- VM_PROT_DEFAULT, TRUE);
+ VM_PROT_DEFAULT, TRUE,
+ VM_PROT_READ | VM_PROT_WRITE);
}
-#endif /* PMAP_NEW */
-
UVMHIST_LOG(maphist, "<- done (KVA=0x%x)", kva,0,0,0);
return(kva);
}
diff --git a/sys/vm/pmap.h b/sys/vm/pmap.h
index af0091c5556..5044bca98ed 100644
--- a/sys/vm/pmap.h
+++ b/sys/vm/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.10 1999/07/18 18:00:08 deraadt Exp $ */
+/* $OpenBSD: pmap.h,v 1.11 1999/09/03 18:02:26 art Exp $ */
/* $NetBSD: pmap.h,v 1.16 1996/03/31 22:15:32 pk Exp $ */
/*
@@ -139,7 +139,7 @@ pmap_t pmap_create __P((vsize_t));
#endif
void pmap_destroy __P((pmap_t));
void pmap_enter __P((pmap_t,
- vaddr_t, paddr_t, vm_prot_t, boolean_t));
+ vaddr_t, paddr_t, vm_prot_t, boolean_t, vm_prot_t));
paddr_t pmap_extract __P((pmap_t, vaddr_t));
#if defined(PMAP_NEW) && defined(PMAP_GROWKERNEL)
void pmap_growkernel __P((vaddr_t));
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index 45ba17b3e10..cf141035a1d 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_fault.c,v 1.16 1998/03/30 18:50:59 niklas Exp $ */
+/* $OpenBSD: vm_fault.c,v 1.17 1999/09/03 18:02:27 art Exp $ */
/* $NetBSD: vm_fault.c,v 1.21 1998/01/31 04:02:39 ross Exp $ */
/*
@@ -816,7 +816,7 @@ vm_fault(map, vaddr, fault_type, change_wiring)
* that the page-out daemon won't find us (yet).
*/
- pmap_enter(map->pmap, vaddr, VM_PAGE_TO_PHYS(m), prot, wired);
+ pmap_enter(map->pmap, vaddr, VM_PAGE_TO_PHYS(m), prot, wired, 0);
/*
* If the page is not wired down, then put it where the
@@ -1016,7 +1016,7 @@ vm_fault_copy_entry(dst_map, src_map, dst_entry, src_entry)
vm_object_unlock(dst_object);
pmap_enter(dst_map->pmap, vaddr, VM_PAGE_TO_PHYS(dst_m), prot,
- FALSE);
+ FALSE, 0);
/*
* Mark it no longer busy, and put it on the active list.
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c
index 0a6edfb0a1c..f76b5e7316a 100644
--- a/sys/vm/vm_glue.c
+++ b/sys/vm/vm_glue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_glue.c,v 1.34 1999/08/17 18:48:59 niklas Exp $ */
+/* $OpenBSD: vm_glue.c,v 1.35 1999/09/03 18:02:27 art Exp $ */
/* $NetBSD: vm_glue.c,v 1.55.4.1 1996/06/13 17:25:45 cgd Exp $ */
/*
@@ -169,7 +169,7 @@ chgkprot(addr, len, rw)
pa = pmap_extract(pmap_kernel(), sva|1);
if (pa == 0)
panic("chgkprot: invalid page");
- pmap_enter(pmap_kernel(), sva, pa&~1, prot, TRUE);
+ pmap_enter(pmap_kernel(), sva, pa&~1, prot, TRUE, 0);
}
}
#endif
diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c
index ea3953c457d..c2da9722860 100644
--- a/sys/vm/vm_kern.c
+++ b/sys/vm/vm_kern.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_kern.c,v 1.10 1998/03/01 00:38:08 niklas Exp $ */
+/* $OpenBSD: vm_kern.c,v 1.11 1999/09/03 18:02:27 art Exp $ */
/* $NetBSD: vm_kern.c,v 1.17.6.1 1996/06/13 17:21:28 cgd Exp $ */
/*
@@ -378,7 +378,7 @@ kmem_malloc(map, size, canwait)
m = vm_page_lookup(kmem_object, offset + i);
vm_object_unlock(kmem_object);
pmap_enter(map->pmap, addr + i, VM_PAGE_TO_PHYS(m),
- VM_PROT_DEFAULT, TRUE);
+ VM_PROT_DEFAULT, TRUE, 0);
}
vm_map_unlock(map);
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 4bf81216712..226be9e7f5d 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_map.c,v 1.17 1999/01/10 21:19:50 art Exp $ */
+/* $OpenBSD: vm_map.c,v 1.18 1999/09/03 18:02:28 art Exp $ */
/* $NetBSD: vm_map.c,v 1.23 1996/02/10 00:08:08 christos Exp $ */
/*
@@ -357,7 +357,7 @@ vm_map_entry_create(map)
PAGE_WAKEUP(m);
pmap_enter(pmap_kernel(), mapvm,
VM_PAGE_TO_PHYS(m),
- VM_PROT_READ|VM_PROT_WRITE, FALSE);
+ VM_PROT_READ|VM_PROT_WRITE, FALSE, 0);
entry = (vm_map_entry_t) mapvm;
mapvm += PAGE_SIZE;
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 766c274f933..4b2137d668a 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_page.c,v 1.16 1999/02/19 02:54:36 deraadt Exp $ */
+/* $OpenBSD: vm_page.c,v 1.17 1999/09/03 18:02:28 art Exp $ */
/* $NetBSD: vm_page.c,v 1.41 1998/02/08 18:24:52 thorpej Exp $ */
#define VM_PAGE_ALLOC_MEMORY_STATS
@@ -410,7 +410,7 @@ vm_bootstrap_steal_memory(size)
/* XXX: should be wired, but some pmaps don't like that ... */
pmap_enter(pmap_kernel(), vaddr, paddr,
- VM_PROT_READ|VM_PROT_WRITE, FALSE);
+ VM_PROT_READ|VM_PROT_WRITE, FALSE, 0);
}
return(addr);
#endif /* PMAP_STEAL_MEMORY */
@@ -1007,7 +1007,7 @@ vm_bootstrap_steal_memory(size)
*/
pmap_enter(pmap_kernel(), vaddr, paddr,
- VM_PROT_READ|VM_PROT_WRITE, FALSE);
+ VM_PROT_READ|VM_PROT_WRITE, FALSE, 0);
}
return addr;
@@ -1840,7 +1840,7 @@ vm_page_alloc_contig(size, low, high, alignment)
tmp_addr - VM_MIN_KERNEL_ADDRESS);
vm_page_wire(m);
pmap_enter(pmap_kernel(), tmp_addr, VM_PAGE_TO_PHYS(m),
- VM_PROT_READ|VM_PROT_WRITE, TRUE);
+ VM_PROT_READ|VM_PROT_WRITE, TRUE, 0);
tmp_addr += PAGE_SIZE;
}
return addr;
diff --git a/sys/vm/vm_pager.c b/sys/vm/vm_pager.c
index 1fc3e730b49..61c2161b53d 100644
--- a/sys/vm/vm_pager.c
+++ b/sys/vm/vm_pager.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_pager.c,v 1.8 1997/11/06 05:59:37 csapuntz Exp $ */
+/* $OpenBSD: vm_pager.c,v 1.9 1999/09/03 18:02:29 art Exp $ */
/* $NetBSD: vm_pager.c,v 1.21 1996/03/16 23:15:25 christos Exp $ */
/*
@@ -341,7 +341,7 @@ vm_pager_map_pages(mlist, npages, canwait)
m->flags |= PG_PAGEROWNED;
#endif
pmap_enter(vm_map_pmap(pager_map), va, VM_PAGE_TO_PHYS(m),
- VM_PROT_DEFAULT, TRUE);
+ VM_PROT_DEFAULT, TRUE, 0);
}
return (kva);
}