summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPer Fogelstrom <pefo@cvs.openbsd.org>1998-04-06 20:21:12 +0000
committerPer Fogelstrom <pefo@cvs.openbsd.org>1998-04-06 20:21:12 +0000
commitecbcac229104ac4c97e0c602293f6958fbf13f3c (patch)
tree5d0d2bb9acd63251dbd9bd7a34f7a4ff5e0bb5ba
parent2a4c792aeddfd3d57c7e60cd8e3a0fa84b80902a (diff)
somewhat more correct trapsignal call
-rw-r--r--sys/arch/powerpc/powerpc/trap.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/arch/powerpc/powerpc/trap.c b/sys/arch/powerpc/powerpc/trap.c
index b68c5ffa343..881c9e5a122 100644
--- a/sys/arch/powerpc/powerpc/trap.c
+++ b/sys/arch/powerpc/powerpc/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.6 1997/10/13 13:43:01 pefo Exp $ */
+/* $OpenBSD: trap.c,v 1.7 1998/04/06 20:21:11 pefo Exp $ */
/* $NetBSD: trap.c,v 1.3 1996/10/13 03:31:37 christos Exp $ */
/*
@@ -63,6 +63,7 @@ trap(frame)
struct proc *p = curproc;
int type = frame->exc;
u_quad_t sticks;
+ union sigval sv;
if (frame->srr1 & PSL_PR) {
type |= EXC_USER;
@@ -123,8 +124,8 @@ printf("kern dsi on addr %x iar %x\n", frame->dar, frame->srr0);
== KERN_SUCCESS)
break;
printf("dsi on addr %x iar %x\n", frame->dar, frame->srr0);
- trapsignal(p, SIGSEGV, vftype, SEGV_MAPERR,
- frame->dar);
+ sv.sival_int = frame->dar;
+ trapsignal(p, SIGSEGV, vftype, SEGV_MAPERR, sv);
}
break;
case EXC_ISI|EXC_USER:
@@ -138,8 +139,8 @@ printf("dsi on addr %x iar %x\n", frame->dar, frame->srr0);
break;
}
printf("isi iar %x\n", frame->srr0);
- trapsignal(p, SIGSEGV, VM_PROT_EXECUTE, SEGV_MAPERR,
- frame->srr0);
+ sv.sival_int = frame->srr0;
+ trapsignal(p, SIGSEGV, VM_PROT_EXECUTE, SEGV_MAPERR, sv);
break;
case EXC_SC|EXC_USER:
{
@@ -264,7 +265,8 @@ mpc_print_pci_stat();
case EXC_PGM|EXC_USER:
printf("pgm iar %x\n", frame->srr0);
- trapsignal(p, SIGILL, 0, ILL_ILLOPC, frame->srr0);
+ sv.sival_int = frame->srr0;
+ trapsignal(p, SIGILL, 0, ILL_ILLOPC, sv);
break;
case EXC_AST|EXC_USER:
/* This is just here that we trap */