summaryrefslogtreecommitdiff
path: root/bl31/aarch64/bl31_entrypoint.S
diff options
context:
space:
mode:
authordanh-arm <dan.handley@arm.com>2014-07-28 14:28:40 +0100
committerdanh-arm <dan.handley@arm.com>2014-07-28 14:28:40 +0100
commit6397bf6a99d785caa9b50016cd6c8eb76083c117 (patch)
tree5e9ffd003cb8046b7eba285907bdedf4bd8c20ba /bl31/aarch64/bl31_entrypoint.S
parent9fd412770f1a7d9c68731a21f157a326db3c5725 (diff)
parent8c106902368c40e14c558a0ab91cc57defdc7e81 (diff)
Merge pull request #172 from soby-mathew/sm/asm_assert
Introduce asm assert and optimize crash reporting
Diffstat (limited to 'bl31/aarch64/bl31_entrypoint.S')
-rw-r--r--bl31/aarch64/bl31_entrypoint.S24
1 files changed, 12 insertions, 12 deletions
diff --git a/bl31/aarch64/bl31_entrypoint.S b/bl31/aarch64/bl31_entrypoint.S
index 69d22436..fb8fd2c4 100644
--- a/bl31/aarch64/bl31_entrypoint.S
+++ b/bl31/aarch64/bl31_entrypoint.S
@@ -82,13 +82,22 @@ func bl31_entrypoint
isb
/* ---------------------------------------------
- * Set the exception vector and zero tpidr_el3
- * until the crash reporting is set up
+ * Initialise cpu_data early to enable crash
+ * reporting to have access to crash stack.
+ * Since crash reporting depends on cpu_data to
+ * report the unhandled exception, not
+ * doing so can lead to recursive exceptions due
+ * to a NULL TPIDR_EL3
+ * ---------------------------------------------
+ */
+ bl init_cpu_data_ptr
+
+ /* ---------------------------------------------
+ * Set the exception vector.
* ---------------------------------------------
*/
adr x1, runtime_exceptions
msr vbar_el3, x1
- msr tpidr_el3, xzr
/* ---------------------------------------------------------------------
* The initial state of the Architectural feature trap register
@@ -147,15 +156,6 @@ func bl31_entrypoint
bl zeromem16
/* ---------------------------------------------
- * Initialise cpu_data and crash reporting
- * ---------------------------------------------
- */
-#if CRASH_REPORTING
- bl init_crash_reporting
-#endif
- bl init_cpu_data_ptr
-
- /* ---------------------------------------------
* Use SP_EL0 for the C runtime stack.
* ---------------------------------------------
*/