summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2020-10-18 14:50:15 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2020-10-18 14:50:15 +0000
commit0bf371eb696e3d87077607a0de80d97d3f6d56f8 (patch)
tree743b775a204e06bbf82b8b6a4446ee61cfdabdc9
parent81a42b0abcdedc2a5538a98fa140b5c905c37f13 (diff)
Handle trace interrupts from userland.
-rw-r--r--sys/arch/powerpc64/powerpc64/trap.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/arch/powerpc64/powerpc64/trap.c b/sys/arch/powerpc64/powerpc64/trap.c
index 02da66d2fa1..d38fc4c0b46 100644
--- a/sys/arch/powerpc64/powerpc64/trap.c
+++ b/sys/arch/powerpc64/powerpc64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.43 2020/10/18 12:21:32 kettenis Exp $ */
+/* $OpenBSD: trap.c,v 1.44 2020/10/18 14:50:14 kettenis Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
@@ -285,6 +285,11 @@ trap(struct trapframe *frame)
frame->srr1 |= PSL_FP;
break;
+ case EXC_TRC|EXC_USER:
+ sv.sival_ptr = (void *)frame->srr0;
+ trapsignal(p, SIGTRAP, 0, TRAP_TRACE, sv);
+ break;
+
case EXC_VEC|EXC_USER:
if ((frame->srr1 & (PSL_FP|PSL_VEC|PSL_VSX)) == 0)
restore_vsx(p);