From 801cf93c48585a83fda5d576b25c7b7f3cd59259 Mon Sep 17 00:00:00 2001 From: Antonio Nino Diaz Date: Fri, 17 Feb 2017 17:11:27 +0000 Subject: Add and use plat_crash_console_flush() API This API makes sure that all the characters sent to the crash console are output before returning from it. Porting guide updated. Change-Id: I1785f970a40f6aacfbe592b6a911b1f249bb2735 Signed-off-by: Antonio Nino Diaz --- common/aarch32/debug.S | 8 +++++++- common/aarch64/debug.S | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'common') diff --git a/common/aarch32/debug.S b/common/aarch32/debug.S index ecf9faff..504da248 100644 --- a/common/aarch32/debug.S +++ b/common/aarch32/debug.S @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -70,6 +70,9 @@ func do_panic /* Print new line */ ldr r4, =panic_end bl asm_print_str + + bl plat_crash_console_flush + 1: mov lr, r6 b plat_panic_handler @@ -140,6 +143,9 @@ dec_print_loop: udiv r5, r5, r6 /* Reduce divisor */ cmp r5, #0 bne dec_print_loop + + bl plat_crash_console_flush + 1: no_ret plat_panic_handler endfunc asm_assert diff --git a/common/aarch64/debug.S b/common/aarch64/debug.S index 9dd53ca9..10818421 100644 --- a/common/aarch64/debug.S +++ b/common/aarch64/debug.S @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2016, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2014-2017, ARM Limited and Contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -96,6 +96,7 @@ func asm_assert b.ne _assert_loop mov x4, x6 asm_print_line_dec + bl plat_crash_console_flush _assert_loop: b _assert_loop endfunc asm_assert @@ -187,6 +188,8 @@ el3_panic: sub x4, x4, #4 bl asm_print_hex + bl plat_crash_console_flush + _panic_handler: /* Pass to plat_panic_handler the address from where el3_panic was * called, not the address of the call from el3_panic. */ -- cgit v1.2.3