Add plat_crash_console_flush to platforms without it
Even though at this point plat_crash_console_flush is optional, it will stop being optional in a following patch. The console driver of warp7 doesn't support flush, so the implementation is a placeholder. TI had ``plat_crash_console_init`` and ``plat_crash_console_putc``, but they weren't global so they weren't actually used. Also, they were calling the wrong functions. imx8_helpers.S only has placeholders for all of the functions. Change-Id: I8d17bbf37c7dad74e134c61ceb92acb9af497718 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
This commit is contained in:
parent
bde25ae28f
commit
9c675b374a
|
@ -12,6 +12,7 @@
|
|||
.globl platform_mem_init
|
||||
.globl plat_crash_console_init
|
||||
.globl plat_crash_console_putc
|
||||
.globl plat_crash_console_flush
|
||||
.globl plat_report_exception
|
||||
.globl plat_reset_handler
|
||||
|
||||
|
@ -60,6 +61,19 @@ func plat_crash_console_putc
|
|||
b console_core_putc
|
||||
endfunc plat_crash_console_putc
|
||||
|
||||
/* ---------------------------------------------
|
||||
* int plat_crash_console_flush()
|
||||
* Function to force a write of all buffered
|
||||
* data that hasn't been output.
|
||||
* Out : return -1 on error else return 0.
|
||||
* Clobber list : x0, x1
|
||||
* ---------------------------------------------
|
||||
*/
|
||||
func plat_crash_console_flush
|
||||
mov_imm x0, CRASH_CONSOLE_BASE
|
||||
b console_core_flush
|
||||
endfunc plat_crash_console_flush
|
||||
|
||||
/* ---------------------------------------------
|
||||
* void plat_report_exception(unsigned int type)
|
||||
* Function to report an unhandled exception
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -14,6 +14,7 @@
|
|||
.globl platform_mem_init
|
||||
.globl plat_crash_console_init
|
||||
.globl plat_crash_console_putc
|
||||
.globl plat_crash_console_flush
|
||||
.globl plat_report_exception
|
||||
.globl plat_reset_handler
|
||||
.globl clr_ex
|
||||
|
@ -64,6 +65,19 @@ func plat_crash_console_putc
|
|||
b console_core_putc
|
||||
endfunc plat_crash_console_putc
|
||||
|
||||
/* ---------------------------------------------
|
||||
* int plat_crash_console_flush()
|
||||
* Function to force a write of all buffered
|
||||
* data that hasn't been output.
|
||||
* Out : return -1 on error else return 0.
|
||||
* Clobber list : x0, x1
|
||||
* ---------------------------------------------
|
||||
*/
|
||||
func plat_crash_console_flush
|
||||
mov_imm x0, CRASH_CONSOLE_BASE
|
||||
b console_core_flush
|
||||
endfunc plat_crash_console_flush
|
||||
|
||||
/* ---------------------------------------------
|
||||
* void plat_report_exception(unsigned int type)
|
||||
* Function to report an unhandled exception
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
.globl plat_secondary_cold_boot_setup
|
||||
.globl plat_crash_console_init
|
||||
.globl plat_crash_console_putc
|
||||
.globl plat_crash_console_flush
|
||||
.globl platform_mem_init
|
||||
.globl imx_mailbox_init
|
||||
|
||||
|
@ -106,6 +107,7 @@ func plat_secondary_cold_boot_setup
|
|||
endfunc plat_secondary_cold_boot_setup
|
||||
|
||||
func plat_crash_console_init
|
||||
mov x0, #1
|
||||
ret
|
||||
endfunc plat_crash_console_init
|
||||
|
||||
|
@ -113,6 +115,11 @@ func plat_crash_console_putc
|
|||
ret
|
||||
endfunc plat_crash_console_putc
|
||||
|
||||
func plat_crash_console_flush
|
||||
mov x0, #0
|
||||
ret
|
||||
endfunc plat_crash_console_flush
|
||||
|
||||
func platform_mem_init
|
||||
ret
|
||||
endfunc platform_mem_init
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
.globl plat_get_my_entrypoint
|
||||
.globl plat_crash_console_init
|
||||
.globl plat_crash_console_putc
|
||||
.globl plat_crash_console_flush
|
||||
.globl plat_panic_handler
|
||||
|
||||
/* ---------------------------------------------
|
||||
|
@ -45,6 +46,12 @@ func plat_crash_console_putc
|
|||
b imx_crash_uart_putc
|
||||
endfunc plat_crash_console_putc
|
||||
|
||||
func plat_crash_console_flush
|
||||
/* Placeholder */
|
||||
mov r0, #0
|
||||
bx lr
|
||||
endfunc plat_crash_console_flush
|
||||
|
||||
func plat_panic_handler
|
||||
mov r3, #HAB_ROM_VECTOR_TABLE_FAILSAFE
|
||||
ldr r3, [r3, #0]
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
.weak plat_my_core_pos
|
||||
.globl plat_crash_console_init
|
||||
.globl plat_crash_console_putc
|
||||
.globl plat_crash_console_flush
|
||||
.globl platform_mem_init
|
||||
.globl disable_mmu_dcache
|
||||
.globl invalidate_tlb_all
|
||||
|
@ -79,6 +80,19 @@ func plat_crash_console_putc
|
|||
b console_core_putc
|
||||
endfunc plat_crash_console_putc
|
||||
|
||||
/* ---------------------------------------------
|
||||
* int plat_crash_console_flush()
|
||||
* Function to force a write of all buffered
|
||||
* data that hasn't been output.
|
||||
* Out : return -1 on error else return 0.
|
||||
* Clobber list : x0, x1
|
||||
* ---------------------------------------------
|
||||
*/
|
||||
func plat_crash_console_flush
|
||||
mov_imm x0, PLAT_MARVELL_CRASH_UART_BASE
|
||||
b console_core_flush
|
||||
endfunc plat_crash_console_flush
|
||||
|
||||
/* ---------------------------------------------------------------------
|
||||
* We don't need to carry out any memory initialization on ARM
|
||||
* platforms. The Secure RAM is accessible straight away.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -36,6 +36,7 @@
|
|||
.globl platform_mem_init
|
||||
.globl plat_crash_console_init
|
||||
.globl plat_crash_console_putc
|
||||
.globl plat_crash_console_flush
|
||||
.globl tegra_secure_entrypoint
|
||||
.globl plat_reset_handler
|
||||
|
||||
|
@ -240,6 +241,20 @@ func plat_crash_console_putc
|
|||
b console_core_putc
|
||||
endfunc plat_crash_console_putc
|
||||
|
||||
/* ---------------------------------------------
|
||||
* int plat_crash_console_flush()
|
||||
* Function to force a write of all buffered
|
||||
* data that hasn't been output.
|
||||
* Out : return -1 on error else return 0.
|
||||
* Clobber list : x0, x1
|
||||
* ---------------------------------------------
|
||||
*/
|
||||
func plat_crash_console_flush
|
||||
adr x0, tegra_console_base
|
||||
ldr x0, [x0]
|
||||
b console_core_flush
|
||||
endfunc plat_crash_console_flush
|
||||
|
||||
/* ---------------------------------------------------
|
||||
* Function to handle a platform reset and store
|
||||
* input parameters passed by BL2.
|
||||
|
|
|
@ -100,13 +100,13 @@ endfunc plat_my_core_pos
|
|||
* Clobber list : x0 - x4
|
||||
* ---------------------------------------------
|
||||
*/
|
||||
.globl plat_crash_console_init
|
||||
func plat_crash_console_init
|
||||
mov_imm x0, CRASH_CONSOLE_BASE
|
||||
mov_imm x1, CRASH_CONSOLE_CLK
|
||||
mov_imm x2, CRASH_CONSOLE_BAUD_RATE
|
||||
mov w3, #0x0
|
||||
b console_core_init
|
||||
|
||||
b console_16550_core_init
|
||||
endfunc plat_crash_console_init
|
||||
|
||||
/* ---------------------------------------------
|
||||
|
@ -116,7 +116,22 @@ endfunc plat_crash_console_init
|
|||
* Clobber list : x1, x2
|
||||
* ---------------------------------------------
|
||||
*/
|
||||
.globl plat_crash_console_putc
|
||||
func plat_crash_console_putc
|
||||
mov_imm x1, CRASH_CONSOLE_BASE
|
||||
b console_core_putc
|
||||
b console_16550_core_putc
|
||||
endfunc plat_crash_console_putc
|
||||
|
||||
/* ---------------------------------------------
|
||||
* int plat_crash_console_flush()
|
||||
* Function to force a write of all buffered
|
||||
* data that hasn't been output.
|
||||
* Out : return -1 on error else return 0.
|
||||
* Clobber list : x0, x1
|
||||
* ---------------------------------------------
|
||||
*/
|
||||
.globl plat_crash_console_flush
|
||||
func plat_crash_console_flush
|
||||
mov_imm x0, CRASH_CONSOLE_BASE
|
||||
b console_16550_core_flush
|
||||
endfunc plat_crash_console_flush
|
||||
|
|
Loading…
Reference in New Issue