summaryrefslogtreecommitdiff
path: root/sys/arch/hppa
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/hppa
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/hppa')
-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
4 files changed, 17 insertions, 13 deletions
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;
}