summaryrefslogtreecommitdiff
path: root/sys/arch/arm64
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2017-12-18 20:03:49 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2017-12-18 20:03:49 +0000
commitf6ae06ce1e37a51988ed40519f3e43ab37856c5c (patch)
tree51098818284a30c3ba5ff658f602991095b09b5c /sys/arch/arm64
parentcdde6597c71a4f9e772ae8f7b9efc77b0396e8b9 (diff)
Generate SIGBUS/BUS_ADRALN when we see a PC Alignment Exception from userland.
ok patrick@
Diffstat (limited to 'sys/arch/arm64')
-rw-r--r--sys/arch/arm64/arm64/trap.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/arch/arm64/arm64/trap.c b/sys/arch/arm64/arm64/trap.c
index 5e14cfd87b5..dfe631791f0 100644
--- a/sys/arch/arm64/arm64/trap.c
+++ b/sys/arch/arm64/arm64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.11 2017/09/16 02:03:40 guenther Exp $ */
+/* $OpenBSD: trap.c,v 1.12 2017/12/18 20:03:48 kettenis Exp $ */
/*-
* Copyright (c) 2014 Andrew Turner
* All rights reserved.
@@ -307,6 +307,11 @@ do_el0_sync(struct trapframe *frame)
vfp_save();
data_abort(frame, esr, 1, 1);
break;
+ case EXCP_PC_ALIGN:
+ vfp_save();
+ sv.sival_ptr = (void *)frame->tf_elr;
+ trapsignal(p, SIGBUS, 0, BUS_ADRALN, sv);
+ break;
case EXCP_DATA_ABORT_L:
vfp_save();
data_abort(frame, esr, 1, 0);