summaryrefslogtreecommitdiffstats
path: root/sys/arm
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2013-05-04 19:59:35 +0000
committerian <ian@FreeBSD.org>2013-05-04 19:59:35 +0000
commitd56690763627565edc11619a4b131c7642ea0691 (patch)
treeaf9daeee126539502b28a57982418470175dbf4c /sys/arm
parent34a388c771c058e2b8f236142c0e7c9607f7b00f (diff)
downloadFreeBSD-src-d56690763627565edc11619a4b131c7642ea0691.zip
FreeBSD-src-d56690763627565edc11619a4b131c7642ea0691.tar.gz
Insert STOP_UNWINDING directives in the _start (kernel entry point) and
fork_trampoline (thread entry point) assembler routines, because it's not possible to unwind beyond those points. Also insert STOP_UNWINDING in the exception_exit routine, to prevent an unwind-loop at that point. This is just a stopgap until we get around to instrumenting all assembler functions with proper unwind metadata.
Diffstat (limited to 'sys/arm')
-rw-r--r--sys/arm/arm/exception.S13
-rw-r--r--sys/arm/arm/locore.S2
-rw-r--r--sys/arm/arm/swtch.S1
3 files changed, 12 insertions, 4 deletions
diff --git a/sys/arm/arm/exception.S b/sys/arm/arm/exception.S
index 2ff0840..498c43f 100644
--- a/sys/arm/arm/exception.S
+++ b/sys/arm/arm/exception.S
@@ -196,15 +196,20 @@ END(address_exception_entry)
* Interrupts are disabled at suitable points to avoid ASTs
* being posted between testing and exit to user mode.
*
- * This function uses PULLFRAMEFROMSVCANDEXIT and
- * DO_AST
- * only be called if the exception handler used PUSHFRAMEINSVC
+ * This function uses PULLFRAMEFROMSVCANDEXIT and DO_AST and can
+ * only be called if the exception handler used PUSHFRAMEINSVC.
*
+ * For EABI, don't try to unwind any further than this. This is a
+ * stopgap measure to avoid getting stuck in a loop in the unwinder,
+ * which happens because we don't yet provide the proper unwind info
+ * here that describes which registers are being restored.
*/
-exception_exit:
+ASENTRY_NP(exception_exit)
+ STOP_UNWINDING
DO_AST
PULLFRAMEFROMSVCANDEXIT
+END(exception_exit)
/*
* undefined_entry:
diff --git a/sys/arm/arm/locore.S b/sys/arm/arm/locore.S
index 372706b..352f742 100644
--- a/sys/arm/arm/locore.S
+++ b/sys/arm/arm/locore.S
@@ -77,6 +77,8 @@ __FBSDID("$FreeBSD$");
*/
ENTRY_NP(btext)
ASENTRY_NP(_start)
+ STOP_UNWINDING /* Can't unwind into the bootloader! */
+
mov r9, r0 /* 0 or boot mode from boot2 */
mov r8, r1 /* Save Machine type */
mov ip, r2 /* Save meta data */
diff --git a/sys/arm/arm/swtch.S b/sys/arm/arm/swtch.S
index f10b8f9..cb07133 100644
--- a/sys/arm/arm/swtch.S
+++ b/sys/arm/arm/swtch.S
@@ -540,6 +540,7 @@ ENTRY(savectx)
END(savectx)
ENTRY(fork_trampoline)
+ STOP_UNWINDING /* Can't unwind beyond the thread enty point */
mov r1, r5
mov r2, sp
mov r0, r4
OpenPOWER on IntegriCloud