summaryrefslogtreecommitdiff
path: root/bl31/aarch64/bl31_entrypoint.S
diff options
context:
space:
mode:
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 6e48e313..e2141f73 100644
--- a/bl31/aarch64/bl31_entrypoint.S
+++ b/bl31/aarch64/bl31_entrypoint.S
@@ -72,13 +72,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
@@ -137,15 +146,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.
* ---------------------------------------------
*/