aboutsummaryrefslogtreecommitdiff
path: root/tftf/framework/aarch64/exceptions.S
diff options
context:
space:
mode:
Diffstat (limited to 'tftf/framework/aarch64/exceptions.S')
-rw-r--r--tftf/framework/aarch64/exceptions.S77
1 files changed, 22 insertions, 55 deletions
diff --git a/tftf/framework/aarch64/exceptions.S b/tftf/framework/aarch64/exceptions.S
index 6014b12ed..37c5218b7 100644
--- a/tftf/framework/aarch64/exceptions.S
+++ b/tftf/framework/aarch64/exceptions.S
@@ -8,83 +8,50 @@
.globl tftf_vector
+/* Exception vector code for unhandled exceptions. Loops forever. */
+.macro unhandled_exception name
+ vector_entry \name
+ b \name
+ end_vector_entry \name
+.endm
+
vector_base tftf_vector
/*
* Current EL with SP0 : 0x0 - 0x200.
*/
-vector_entry SynchronousExceptionSP0
- b SynchronousExceptionSP0
-end_vector_entry SynchronousExceptionSP0
-
-vector_entry IrqSP0
- b IrqSP0
-end_vector_entry IrqSP0
-
-vector_entry FiqSP0
- b FiqSP0
-end_vector_entry FiqSP0
-
-vector_entry SErrorSP0
- b SErrorSP0
-end_vector_entry SErrorSP0
+unhandled_exception SynchronousExceptionSP0
+unhandled_exception IrqSP0
+unhandled_exception FiqSP0
+unhandled_exception SErrorSP0
/*
* Current EL with SPx : 0x200 - 0x400.
*/
-vector_entry SynchronousExceptionSPx
- b SynchronousExceptionSPx
-end_vector_entry SynchronousExceptionSPx
+unhandled_exception SynchronousExceptionSPx
vector_entry IrqSPx
b irq_vector_entry
end_vector_entry IrqSPx
-vector_entry FiqSPx
- b FiqSPx
-end_vector_entry FiqSPx
-
-vector_entry SErrorSPx
- b SErrorSPx
-end_vector_entry SErrorSPx
+unhandled_exception FiqSPx
+unhandled_exception SErrorSPx
/*
* Lower EL using AArch64 : 0x400 - 0x600.
*/
-vector_entry SynchronousExceptionA64
- b SynchronousExceptionA64
-end_vector_entry SynchronousExceptionA64
-
-vector_entry IrqA64
- b IrqA64
-end_vector_entry IrqA64
-
-vector_entry FiqA64
- b FiqA64
-end_vector_entry FiqA64
-
-vector_entry SErrorA64
- b SErrorA64
-end_vector_entry SErrorA64
+unhandled_exception SynchronousExceptionA64
+unhandled_exception IrqA64
+unhandled_exception FiqA64
+unhandled_exception SErrorA64
/*
* Lower EL using AArch32 : 0x600 - 0x800.
*/
-vector_entry SynchronousExceptionA32
- b SynchronousExceptionA32
-end_vector_entry SynchronousExceptionA32
-
-vector_entry IrqA32
- b IrqA32
-end_vector_entry IrqA32
-
-vector_entry FiqA32
- b FiqA32
-end_vector_entry FiqA32
-
-vector_entry SErrorA32
- b SErrorA32
-end_vector_entry SErrorA32
+unhandled_exception SynchronousExceptionA32
+unhandled_exception IrqA32
+unhandled_exception FiqA32
+unhandled_exception SErrorA32
/*
* Exceptions will always be from the same exception level so no need to save