diff options
author | 2002-07-25 02:26:17 +0000 | |
---|---|---|
committer | 2002-07-25 02:26:17 +0000 | |
commit | 6198d0671d911102830fd55a01256409650cea59 (patch) | |
tree | 8f040d015f2896186f11a3251d41614b0a9ec023 | |
parent | sync (diff) | |
download | wireguard-openbsd-6198d0671d911102830fd55a01256409650cea59.tar.xz wireguard-openbsd-6198d0671d911102830fd55a01256409650cea59.zip |
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)
-rw-r--r-- | sys/arch/hppa/hppa/trap.c | 10 |
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) { |