summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1997-01-07 05:37:38 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1997-01-07 05:37:38 +0000
commit27f65398f872a8be39f3cff5bed8e2185eb72a7a (patch)
treefc2a736a6fada935798dbe309e8caca05fb26217 /sys/arch
parente232dfde38d6b0996968d4320bfea8fb18b8a79a (diff)
Fix for final ptdi panic on i386
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/i386/pmap.c19
-rw-r--r--sys/arch/i386/i386/pmap.old.c19
-rw-r--r--sys/arch/i386/include/pmap.h3
-rw-r--r--sys/arch/i386/include/pmap.old.h3
4 files changed, 40 insertions, 4 deletions
diff --git a/sys/arch/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c
index cf4c5717c1f..3e7d0d0db44 100644
--- a/sys/arch/i386/i386/pmap.c
+++ b/sys/arch/i386/i386/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.15 1996/10/25 11:14:13 deraadt Exp $ */
+/* $OpenBSD: pmap.c,v 1.16 1997/01/07 05:37:32 tholo Exp $ */
/* $NetBSD: pmap.c,v 1.36 1996/05/03 19:42:22 christos Exp $ */
/*
@@ -1726,6 +1726,23 @@ pmap_changebit(pa, setbits, maskbits)
splx(s);
}
+void
+pmap_prefault(map, v, l)
+ vm_map_t map;
+ vm_offset_t v;
+ vm_size_t l;
+{
+ vm_offset_t pv, pv2;
+
+ for (pv = v; pv < v + l ; pv += ~PD_MASK + 1) {
+ if (!pmap_pde_v(pmap_pde(map->pmap, pv))) {
+ pv2 = trunc_page(vtopte(pv));
+ vm_fault(map, pv2, VM_PROT_READ, FALSE);
+ }
+ pv &= PD_MASK;
+ }
+}
+
#ifdef DEBUG
void
pmap_pvdump(pa)
diff --git a/sys/arch/i386/i386/pmap.old.c b/sys/arch/i386/i386/pmap.old.c
index 57ae1e13313..0aa7a5d478f 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.15 1996/10/25 11:14:13 deraadt Exp $ */
+/* $OpenBSD: pmap.old.c,v 1.16 1997/01/07 05:37:32 tholo Exp $ */
/* $NetBSD: pmap.c,v 1.36 1996/05/03 19:42:22 christos Exp $ */
/*
@@ -1726,6 +1726,23 @@ pmap_changebit(pa, setbits, maskbits)
splx(s);
}
+void
+pmap_prefault(map, v, l)
+ vm_map_t map;
+ vm_offset_t v;
+ vm_size_t l;
+{
+ vm_offset_t pv, pv2;
+
+ for (pv = v; pv < v + l ; pv += ~PD_MASK + 1) {
+ if (!pmap_pde_v(pmap_pde(map->pmap, pv))) {
+ pv2 = trunc_page(vtopte(pv));
+ vm_fault(map, pv2, VM_PROT_READ, FALSE);
+ }
+ pv &= PD_MASK;
+ }
+}
+
#ifdef DEBUG
void
pmap_pvdump(pa)
diff --git a/sys/arch/i386/include/pmap.h b/sys/arch/i386/include/pmap.h
index 4d43e526f80..67415f52349 100644
--- a/sys/arch/i386/include/pmap.h
+++ b/sys/arch/i386/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.7 1996/10/25 11:14:16 deraadt Exp $ */
+/* $OpenBSD: pmap.h,v 1.8 1997/01/07 05:37:34 tholo Exp $ */
/* $NetBSD: pmap.h,v 1.23 1996/05/03 19:26:30 christos Exp $ */
/*
@@ -86,6 +86,7 @@ extern int PTDpaddr; /* physical address of kernel PTD */
void pmap_bootstrap __P((vm_offset_t start));
boolean_t pmap_testbit __P((vm_offset_t, int));
void pmap_changebit __P((vm_offset_t, int, int));
+void pmap_prefault __P((vm_map_t, vm_offset_t, vm_size_t));
#endif
/*
diff --git a/sys/arch/i386/include/pmap.old.h b/sys/arch/i386/include/pmap.old.h
index 3fbeaf58fdd..bbe198f994f 100644
--- a/sys/arch/i386/include/pmap.old.h
+++ b/sys/arch/i386/include/pmap.old.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.old.h,v 1.7 1996/10/25 11:14:16 deraadt Exp $ */
+/* $OpenBSD: pmap.old.h,v 1.8 1997/01/07 05:37:34 tholo Exp $ */
/* $NetBSD: pmap.h,v 1.23 1996/05/03 19:26:30 christos Exp $ */
/*
@@ -86,6 +86,7 @@ extern int PTDpaddr; /* physical address of kernel PTD */
void pmap_bootstrap __P((vm_offset_t start));
boolean_t pmap_testbit __P((vm_offset_t, int));
void pmap_changebit __P((vm_offset_t, int, int));
+void pmap_prefault __P((vm_map_t, vm_offset_t, vm_size_t));
#endif
/*