diff options
author | Yann Gautier <yann.gautier@st.com> | 2020-09-17 15:15:27 +0200 |
---|---|---|
committer | Yann Gautier <yann.gautier@st.com> | 2020-09-21 17:53:42 +0200 |
commit | 00a55fe4c5d206e9ecec9d598dfb99a1ac8b296a (patch) | |
tree | c8253b37f8fe20dcf5400625108c0e1650205c7d /common/aarch64/debug.S | |
parent | dffd5192df41e77e27bb524bfe64d747c1c43522 (diff) | |
download | platform_external_arm-trusted-firmware-00a55fe4c5d206e9ecec9d598dfb99a1ac8b296a.tar.gz platform_external_arm-trusted-firmware-00a55fe4c5d206e9ecec9d598dfb99a1ac8b296a.tar.bz2 platform_external_arm-trusted-firmware-00a55fe4c5d206e9ecec9d598dfb99a1ac8b296a.zip |
Align AARCH32 version of debug.S with AARCH64
Re-order code (put panic and report_exception at the end of the file).
Export asm_print_* functions.
Add asm_print_line_dec macro, and asm_print_newline func.
Align comments in both AARCH32 and AARCH64 files.
Add blank lines in AARCH64 files to align with AARCH32.
Change-Id: I8e299a27c1390f71f04e260cd4a0e59b2384eb19
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Diffstat (limited to 'common/aarch64/debug.S')
-rw-r--r-- | common/aarch64/debug.S | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/common/aarch64/debug.S b/common/aarch64/debug.S index 7db24396e..ad6acd9d2 100644 --- a/common/aarch64/debug.S +++ b/common/aarch64/debug.S @@ -38,11 +38,11 @@ assert_msg2: mov x6, #10 /* Divide by 10 after every loop iteration */ mov x5, #MAX_DEC_DIVISOR dec_print_loop: - udiv x0, x4, x5 /* Get the quotient */ - msub x4, x0, x5, x4 /* Find the remainder */ - add x0, x0, #ASCII_OFFSET_NUM /* Convert to ascii */ + udiv x0, x4, x5 /* Get the quotient */ + msub x4, x0, x5, x4 /* Find the remainder */ + add x0, x0, #ASCII_OFFSET_NUM /* Convert to ascii */ bl plat_crash_console_putc - udiv x5, x5, x6 /* Reduce divisor */ + udiv x5, x5, x6 /* Reduce divisor */ cbnz x5, dec_print_loop .endm @@ -64,10 +64,13 @@ func asm_assert */ mov x5, x0 mov x6, x1 + /* Ensure the console is initialized */ bl plat_crash_console_init + /* Check if the console is initialized */ cbz x0, _assert_loop + /* The console is initialized */ adr x4, assert_msg1 bl asm_print_str @@ -75,6 +78,7 @@ func asm_assert bl asm_print_str adr x4, assert_msg2 bl asm_print_str + /* Check if line number higher than max permitted */ tst x6, #~0xffff b.ne _assert_loop @@ -191,12 +195,15 @@ panic_common: el3_panic: mov x6, x30 bl plat_crash_console_init + /* Check if the console is initialized */ cbz x0, _panic_handler + /* The console is initialized */ adr x4, panic_msg bl asm_print_str mov x4, x6 + /* The panic location is lr -4 */ sub x4, x4, #4 bl asm_print_hex |