refactor(aarch64): remove weak links to el3_panic
Cleanup weak links to el3_panic and restrict crash_reporting usage
to bl31.
Crash reporting is not used with bl1, bl2 and weak linkage to el3_panic
is used, this can cause ambiguity in understanding the code so remove
this weak linkage and introduce funcs that should be used when we have
crash reporting for el3 panics.
Change-Id: Ic5c711143ba36898ef9574a078b8fa02effceb12
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
diff --git a/common/aarch64/debug.S b/common/aarch64/debug.S
index 5fdaf64..6b92294 100644
--- a/common/aarch64/debug.S
+++ b/common/aarch64/debug.S
@@ -14,6 +14,7 @@
.globl asm_print_newline
.globl asm_assert
.globl do_panic
+ .globl el3_panic
/* Since the max decimal input number is 65536 */
#define MAX_DEC_DIVISOR 10000
@@ -158,13 +159,10 @@
* ---------------------------------------------------------------------------
*/
-/* This is for the non el3 BL stages to compile through */
- .weak el3_panic
-
func do_panic
-#if CRASH_REPORTING
- b el3_panic
-#endif /* CRASH_REPORTING */
+#if CRASH_REPORTING && defined(IMAGE_BL31)
+ b report_el3_panic
+#endif /* CRASH_REPORTING && IMAGE_BL31 */
panic_common:
/*
@@ -197,4 +195,5 @@
* called, not the address of the call from el3_panic. */
mov x30, x6
b plat_panic_handler
-endfunc do_panic
+
+endfunc do_panic
\ No newline at end of file