]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
refactor(aarch64): remove weak links to el3_panic
authorGovindraj Raja <govindraj.raja@arm.com>
Mon, 16 Jan 2023 16:44:45 +0000 (16:44 +0000)
committerGovindraj Raja <govindraj.raja@arm.com>
Tue, 21 Feb 2023 17:26:01 +0000 (17:26 +0000)
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>
bl31/aarch64/crash_reporting.S
common/aarch64/debug.S

index 6b9767c84ad47eae5bfa93aed9505cf238a476ad..4cec1103e1e531f0f49f8dc51869dfc170705a7c 100644 (file)
@@ -15,7 +15,7 @@
 
        .globl  report_unhandled_exception
        .globl  report_unhandled_interrupt
-       .globl  el3_panic
+       .globl  report_el3_panic
        .globl  report_elx_panic
 
 #if CRASH_REPORTING
@@ -297,7 +297,7 @@ endfunc     report_elx_panic
         * will not return.
         * -----------------------------------------------------
         */
-func el3_panic
+func report_el3_panic
        msr     spsel, #MODE_SP_ELX
        prepare_crash_buf_save_x0_x1
        adr     x0, panic_msg
@@ -455,7 +455,7 @@ print_el3_sys_regs:
 
        /* Done reporting */
        no_ret  plat_panic_handler
-endfunc el3_panic
+endfunc report_el3_panic
 
 #else  /* CRASH_REPORTING */
 func report_unhandled_exception
index 5fdaf641733b86d73b808f7e255e201e7c8bc229..6b92294c083455bdf331d4932b6207bd551ea756 100644 (file)
@@ -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 @@ endfunc asm_print_newline
  * ---------------------------------------------------------------------------
  */
 
-/* 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 @@ _panic_handler:
         * 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