aboutsummaryrefslogtreecommitdiff
path: root/tftf/framework
diff options
context:
space:
mode:
authorSandrine Bailleux <sandrine.bailleux@arm.com>2019-01-14 09:37:28 +0100
committerSandrine Bailleux <sandrine.bailleux@arm.com>2019-01-24 08:59:54 +0100
commite760449e0759d351b849c5934cfa2ee06bde89a7 (patch)
tree52d0550dfa247e432bff782182544bae38f5afbd /tftf/framework
parent9e550b6f75f064b53d74a4ad3c8672332d87451c (diff)
downloadtf-a-tests-e760449e0759d351b849c5934cfa2ee06bde89a7.tar.gz
Improve readability of TFTF exceptions code
The only exceptions that TFTF expects are IRQs from the current exception level. All other exceptions are unhandled and put the TFTF into an irrecoverable state. Introduce an unhandled_exception macro that makes it clearer. Change-Id: Ia64600d540007a648c14d8663c91c60c8591eae6 Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Diffstat (limited to 'tftf/framework')
-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 6014b12e..37c5218b 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