diff options
author | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2017-02-16 16:49:18 +0000 |
---|---|---|
committer | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2017-03-31 09:54:22 +0100 |
commit | 1e09ff93444943edcebfb167202f37a5e7913d92 (patch) | |
tree | e3281d929b4cfc7ec318257a0c9471178b743491 | |
parent | 0b32628eddfef95b51909816f625e6f37cd21cb8 (diff) | |
download | arm-trusted-firmware-1e09ff93444943edcebfb167202f37a5e7913d92.tar.gz |
Remove dead loops in assert() in C and ASM
The desired behaviour is to call `plat_panic_handler()`, and to use
`no_ret` to do so from ASM.
Change-Id: I88b2feefa6e6c8f9bf057fd51ee0d2e9fb551e4f
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
-rw-r--r-- | common/aarch32/debug.S | 2 | ||||
-rw-r--r-- | common/aarch64/debug.S | 2 | ||||
-rw-r--r-- | lib/stdlib/assert.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/common/aarch32/debug.S b/common/aarch32/debug.S index 504da248a..77298a12e 100644 --- a/common/aarch32/debug.S +++ b/common/aarch32/debug.S @@ -75,7 +75,7 @@ func do_panic 1: mov lr, r6 - b plat_panic_handler + no_ret plat_panic_handler endfunc do_panic /*********************************************************** diff --git a/common/aarch64/debug.S b/common/aarch64/debug.S index 10818421d..fb6924ea1 100644 --- a/common/aarch64/debug.S +++ b/common/aarch64/debug.S @@ -98,7 +98,7 @@ func asm_assert asm_print_line_dec bl plat_crash_console_flush _assert_loop: - b _assert_loop + no_ret plat_panic_handler endfunc asm_assert #endif diff --git a/lib/stdlib/assert.c b/lib/stdlib/assert.c index cb3f3550e..3486e50b1 100644 --- a/lib/stdlib/assert.c +++ b/lib/stdlib/assert.c @@ -42,5 +42,5 @@ void __assert (const char *function, const char *file, unsigned int line, console_flush(); - while(1); + plat_panic_handler(); } |