mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-26 14:55:16 +00:00
Merge pull request #1334 from michpappas/tf-issues#572_qemu_dont_use_C_for_crash_console
qemu: don't use C functions for the crash console callbacks
This commit is contained in:
commit
f11916bf1d
4 changed files with 22 additions and 22 deletions
|
@ -66,8 +66,6 @@ int console_flush(void);
|
||||||
/* REMOVED on AArch64 -- use console_<driver>_register() instead! */
|
/* REMOVED on AArch64 -- use console_<driver>_register() instead! */
|
||||||
int console_init(uintptr_t base_addr,
|
int console_init(uintptr_t base_addr,
|
||||||
unsigned int uart_clk, unsigned int baud_rate);
|
unsigned int uart_clk, unsigned int baud_rate);
|
||||||
int console_core_init(uintptr_t base_addr,
|
|
||||||
unsigned int uart_clk, unsigned int baud_rate);
|
|
||||||
void console_uninit(void);
|
void console_uninit(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,8 @@
|
||||||
.globl platform_mem_init
|
.globl platform_mem_init
|
||||||
.globl plat_qemu_calc_core_pos
|
.globl plat_qemu_calc_core_pos
|
||||||
.globl plat_crash_console_init
|
.globl plat_crash_console_init
|
||||||
#if MULTI_CONSOLE_API
|
|
||||||
.globl plat_crash_console_putc
|
.globl plat_crash_console_putc
|
||||||
#endif /* MULTI_CONSOLE_API */
|
.globl plat_crash_console_flush
|
||||||
.globl plat_secondary_cold_boot_setup
|
.globl plat_secondary_cold_boot_setup
|
||||||
.globl plat_get_my_entrypoint
|
.globl plat_get_my_entrypoint
|
||||||
.globl plat_is_my_cpu_primary
|
.globl plat_is_my_cpu_primary
|
||||||
|
@ -97,7 +96,10 @@ endfunc platform_mem_init
|
||||||
* ---------------------------------------------
|
* ---------------------------------------------
|
||||||
*/
|
*/
|
||||||
func plat_crash_console_init
|
func plat_crash_console_init
|
||||||
b qemu_crash_console_init
|
mov_imm x0, PLAT_QEMU_CRASH_UART_BASE
|
||||||
|
mov_imm x1, PLAT_QEMU_CRASH_UART_CLK_IN_HZ
|
||||||
|
mov_imm x2, PLAT_QEMU_CONSOLE_BAUDRATE
|
||||||
|
b console_pl011_core_init
|
||||||
endfunc plat_crash_console_init
|
endfunc plat_crash_console_init
|
||||||
|
|
||||||
/* ---------------------------------------------
|
/* ---------------------------------------------
|
||||||
|
@ -107,10 +109,21 @@ endfunc plat_crash_console_init
|
||||||
* Clobber list : x1, x2
|
* Clobber list : x1, x2
|
||||||
* ---------------------------------------------
|
* ---------------------------------------------
|
||||||
*/
|
*/
|
||||||
#if !MULTI_CONSOLE_API
|
|
||||||
func plat_crash_console_putc
|
func plat_crash_console_putc
|
||||||
mov_imm x1, PLAT_QEMU_CRASH_UART_BASE
|
mov_imm x1, PLAT_QEMU_CRASH_UART_BASE
|
||||||
b console_core_putc
|
b console_pl011_core_putc
|
||||||
endfunc plat_crash_console_putc
|
endfunc plat_crash_console_putc
|
||||||
#endif /* MULTI_CONSOLE_API */
|
|
||||||
|
/* ---------------------------------------------
|
||||||
|
* int plat_crash_console_flush(int c)
|
||||||
|
* 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_QEMU_CRASH_UART_BASE
|
||||||
|
b console_pl011_core_flush
|
||||||
|
endfunc plat_crash_console_flush
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
|
|
||||||
#if MULTI_CONSOLE_API
|
#if MULTI_CONSOLE_API
|
||||||
static console_pl011_t console;
|
static console_pl011_t console;
|
||||||
static console_pl011_t crash_console;
|
|
||||||
#endif /* MULTI_CONSOLE_API */
|
#endif /* MULTI_CONSOLE_API */
|
||||||
|
|
||||||
void qemu_console_init(void)
|
void qemu_console_init(void)
|
||||||
|
@ -18,6 +17,9 @@ void qemu_console_init(void)
|
||||||
(void)console_pl011_register(PLAT_QEMU_BOOT_UART_BASE,
|
(void)console_pl011_register(PLAT_QEMU_BOOT_UART_BASE,
|
||||||
PLAT_QEMU_BOOT_UART_CLK_IN_HZ,
|
PLAT_QEMU_BOOT_UART_CLK_IN_HZ,
|
||||||
PLAT_QEMU_CONSOLE_BAUDRATE, &console);
|
PLAT_QEMU_CONSOLE_BAUDRATE, &console);
|
||||||
|
|
||||||
|
console_set_scope(&console.console, CONSOLE_FLAG_BOOT |
|
||||||
|
CONSOLE_FLAG_RUNTIME);
|
||||||
#else
|
#else
|
||||||
console_init(PLAT_QEMU_BOOT_UART_BASE,
|
console_init(PLAT_QEMU_BOOT_UART_BASE,
|
||||||
PLAT_QEMU_BOOT_UART_CLK_IN_HZ,
|
PLAT_QEMU_BOOT_UART_CLK_IN_HZ,
|
||||||
|
@ -25,15 +27,3 @@ void qemu_console_init(void)
|
||||||
#endif /* MULTI_CONSOLE_API */
|
#endif /* MULTI_CONSOLE_API */
|
||||||
}
|
}
|
||||||
|
|
||||||
void qemu_crash_console_init(void)
|
|
||||||
{
|
|
||||||
#if MULTI_CONSOLE_API
|
|
||||||
(void)console_pl011_register(PLAT_QEMU_CRASH_UART_BASE,
|
|
||||||
PLAT_QEMU_CRASH_UART_CLK_IN_HZ,
|
|
||||||
PLAT_QEMU_CONSOLE_BAUDRATE, &crash_console);
|
|
||||||
#else
|
|
||||||
console_core_init(PLAT_QEMU_CRASH_UART_BASE,
|
|
||||||
PLAT_QEMU_CRASH_UART_CLK_IN_HZ,
|
|
||||||
PLAT_QEMU_CONSOLE_BAUDRATE);
|
|
||||||
#endif /* MULTI_CONSOLE_API */
|
|
||||||
}
|
|
||||||
|
|
|
@ -35,6 +35,5 @@ int dt_add_psci_node(void *fdt);
|
||||||
int dt_add_psci_cpu_enable_methods(void *fdt);
|
int dt_add_psci_cpu_enable_methods(void *fdt);
|
||||||
|
|
||||||
void qemu_console_init(void);
|
void qemu_console_init(void);
|
||||||
void qemu_crash_console_init(void);
|
|
||||||
|
|
||||||
#endif /*__QEMU_PRIVATE_H*/
|
#endif /*__QEMU_PRIVATE_H*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue