aboutsummaryrefslogtreecommitdiff
path: root/tftf/framework/aarch32/exceptions.S
diff options
context:
space:
mode:
Diffstat (limited to 'tftf/framework/aarch32/exceptions.S')
-rw-r--r--tftf/framework/aarch32/exceptions.S24
1 files changed, 17 insertions, 7 deletions
diff --git a/tftf/framework/aarch32/exceptions.S b/tftf/framework/aarch32/exceptions.S
index 1e6c574db..aaeb93c1a 100644
--- a/tftf/framework/aarch32/exceptions.S
+++ b/tftf/framework/aarch32/exceptions.S
@@ -12,13 +12,23 @@
vector_base tftf_vector
b tftf_entrypoint
- b . /* Undef */
- b . /* Syscall */
- b . /* Prefetch abort */
- b . /* Data abort */
- b . /* Hyp trap */
- b tftf_intr_handle/* IRQ */
- b . /* FIQ */
+ b crash_dump /* Undef */
+ b crash_dump /* Syscall */
+ b crash_dump /* Prefetch abort */
+ b crash_dump /* Data abort */
+ b crash_dump /* Hyp trap */
+ b tftf_intr_handle /* IRQ */
+ b crash_dump /* FIQ */
+
+func crash_dump
+ /* Save SP and general-purpose registers on the stack. */
+ push {sp}
+ push {r0-r12, lr}
+
+ /* Print the saved CPU context on the UART. */
+ mov r0, sp
+ b print_exception
+endfunc crash_dump
/* ----------------------------------------------------------------------------
* The IRQ exception handler