diff --git a/common/aarch32/debug.S b/common/aarch32/debug.S index 504da248ac24d1b98806526a4cc8f662db650e59..77298a12e6aa07247033f4f015dc0b7383c64fb1 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 10818421df815c4aabf061b38988d30709e16938..fb6924ea19c75de065faffbfeded7a172ce9bc6b 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 cb3f3550eabaf3e73213b7b24bdc776be5755159..3486e50b1549f077868734c44a1f8b2b006a61dd 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(); }