summaryrefslogtreecommitdiff
path: root/sys/arch/hppa
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2002-07-25 02:26:18 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2002-07-25 02:26:18 +0000
commit541d9e06d176f660decef027d507eb83054e126c (patch)
treefb76ac7bcad7d0f48c3b1202428079b3cc14bc8a /sys/arch/hppa
parentbdf46d24212c7fe8d94adde383df53ed88cb91cf (diff)
only one trap generates exec fault and fetches the fault address from the pc queues, also supply fault_type (not that it is used that much)
Diffstat (limited to 'sys/arch/hppa')
-rw-r--r--sys/arch/hppa/hppa/trap.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/arch/hppa/hppa/trap.c b/sys/arch/hppa/hppa/trap.c
index ac94ab72aca..e41999aeb61 100644
--- a/sys/arch/hppa/hppa/trap.c
+++ b/sys/arch/hppa/hppa/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.44 2002/07/21 11:47:39 mickey Exp $ */
+/* $OpenBSD: trap.c,v 1.45 2002/07/25 02:26:17 mickey Exp $ */
/*
* Copyright (c) 1998-2001 Michael Shalayeff
@@ -141,16 +141,18 @@ trap(type, frame)
u_int opcode;
int ret, s, si, trapnum;
const char *tts;
+ vm_fault_t fault = VM_FAULT_INVALID;
trapnum = type & ~T_USER;
opcode = frame->tf_iir;
- if (trapnum == T_ITLBMISS || trapnum == T_ITLBMISSNA) {
+ if (trapnum == T_ITLBMISS) {
va = frame->tf_iioq_head;
space = frame->tf_iisq_head;
vftype = VM_PROT_EXECUTE;
} else {
va = frame->tf_ior;
space = frame->tf_isr;
+ /* what is the vftype for the T_ITLBMISSNA ??? XXX */
vftype = inst_store(opcode) ? VM_PROT_WRITE : VM_PROT_READ;
}
@@ -279,6 +281,7 @@ trap(type, frame)
break;
case T_DATACC: case T_USER | T_DATACC:
+ fault = VM_FAULT_PROTECT;
case T_ITLBMISS: case T_USER | T_ITLBMISS:
case T_DTLBMISS: case T_USER | T_DTLBMISS:
case T_ITLBMISSNA: case T_USER | T_ITLBMISSNA:
@@ -317,8 +320,7 @@ trap(type, frame)
pmapdebug = 0xffffff;
}
#endif
-
- ret = uvm_fault(map, va, 0, vftype);
+ ret = uvm_fault(map, va, fault, vftype);
#ifdef TRAPDEBUG
if (space == -1) {