Merge changes from topic "av/console-port" into integration
* changes: qemu: use new console interface in aarch32 warp7: remove old console from makefile Remove MULTI_CONSOLE_API flag and references to it Console: removed legacy console API
This commit is contained in:
commit
39c92b6271
2
Makefile
2
Makefile
|
@ -647,7 +647,6 @@ $(eval $(call assert_boolean,GENERATE_COT))
|
||||||
$(eval $(call assert_boolean,GICV2_G0_FOR_EL3))
|
$(eval $(call assert_boolean,GICV2_G0_FOR_EL3))
|
||||||
$(eval $(call assert_boolean,HANDLE_EA_EL3_FIRST))
|
$(eval $(call assert_boolean,HANDLE_EA_EL3_FIRST))
|
||||||
$(eval $(call assert_boolean,HW_ASSISTED_COHERENCY))
|
$(eval $(call assert_boolean,HW_ASSISTED_COHERENCY))
|
||||||
$(eval $(call assert_boolean,MULTI_CONSOLE_API))
|
|
||||||
$(eval $(call assert_boolean,NS_TIMER_SWITCH))
|
$(eval $(call assert_boolean,NS_TIMER_SWITCH))
|
||||||
$(eval $(call assert_boolean,OVERRIDE_LIBC))
|
$(eval $(call assert_boolean,OVERRIDE_LIBC))
|
||||||
$(eval $(call assert_boolean,PL011_GENERIC_UART))
|
$(eval $(call assert_boolean,PL011_GENERIC_UART))
|
||||||
|
@ -702,7 +701,6 @@ $(eval $(call add_define,GICV2_G0_FOR_EL3))
|
||||||
$(eval $(call add_define,HANDLE_EA_EL3_FIRST))
|
$(eval $(call add_define,HANDLE_EA_EL3_FIRST))
|
||||||
$(eval $(call add_define,HW_ASSISTED_COHERENCY))
|
$(eval $(call add_define,HW_ASSISTED_COHERENCY))
|
||||||
$(eval $(call add_define,LOG_LEVEL))
|
$(eval $(call add_define,LOG_LEVEL))
|
||||||
$(eval $(call add_define,MULTI_CONSOLE_API))
|
|
||||||
$(eval $(call add_define,NS_TIMER_SWITCH))
|
$(eval $(call add_define,NS_TIMER_SWITCH))
|
||||||
$(eval $(call add_define,PL011_GENERIC_UART))
|
$(eval $(call add_define,PL011_GENERIC_UART))
|
||||||
$(eval $(call add_define,PLAT_${PLAT}))
|
$(eval $(call add_define,PLAT_${PLAT}))
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved.
|
* Copyright (c) 2016-2019, ARM Limited and Contributors. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -9,14 +9,6 @@
|
||||||
#include <console_macros.S>
|
#include <console_macros.S>
|
||||||
#include <drivers/arm/pl011.h>
|
#include <drivers/arm/pl011.h>
|
||||||
|
|
||||||
#if !MULTI_CONSOLE_API
|
|
||||||
/*
|
|
||||||
* Pull in generic functions to provide backwards compatibility for
|
|
||||||
* platform makefiles
|
|
||||||
*/
|
|
||||||
#include "../../../console/aarch32/console.S"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* "core" functions are low-level implementations that don't require
|
* "core" functions are low-level implementations that don't require
|
||||||
* writeable memory and are thus safe to call in BL1 crash context.
|
* writeable memory and are thus safe to call in BL1 crash context.
|
||||||
|
@ -94,7 +86,6 @@ core_init_fail:
|
||||||
bx lr
|
bx lr
|
||||||
endfunc console_pl011_core_init
|
endfunc console_pl011_core_init
|
||||||
|
|
||||||
#if MULTI_CONSOLE_API
|
|
||||||
.globl console_pl011_register
|
.globl console_pl011_register
|
||||||
|
|
||||||
/* -------------------------------------------------------
|
/* -------------------------------------------------------
|
||||||
|
@ -130,16 +121,6 @@ func console_pl011_register
|
||||||
register_fail:
|
register_fail:
|
||||||
pop {r4, pc}
|
pop {r4, pc}
|
||||||
endfunc console_pl011_register
|
endfunc console_pl011_register
|
||||||
#else
|
|
||||||
.globl console_core_init
|
|
||||||
.globl console_core_putc
|
|
||||||
.globl console_core_getc
|
|
||||||
.globl console_core_flush
|
|
||||||
.equ console_core_init, console_pl011_core_init
|
|
||||||
.equ console_core_putc, console_pl011_core_putc
|
|
||||||
.equ console_core_getc, console_pl011_core_getc
|
|
||||||
.equ console_core_flush, console_pl011_core_flush
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* --------------------------------------------------------
|
/* --------------------------------------------------------
|
||||||
* int console_core_putc(int c, uintptr_t base_addr)
|
* int console_core_putc(int c, uintptr_t base_addr)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved.
|
* Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -9,14 +9,6 @@
|
||||||
#include <console_macros.S>
|
#include <console_macros.S>
|
||||||
#include <drivers/arm/pl011.h>
|
#include <drivers/arm/pl011.h>
|
||||||
|
|
||||||
#if !MULTI_CONSOLE_API
|
|
||||||
/*
|
|
||||||
* Pull in generic functions to provide backwards compatibility for
|
|
||||||
* platform makefiles
|
|
||||||
*/
|
|
||||||
#include "../../../console/aarch64/console.S"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* "core" functions are low-level implementations that don't require
|
* "core" functions are low-level implementations that don't require
|
||||||
* writable memory and are thus safe to call in BL1 crash context.
|
* writable memory and are thus safe to call in BL1 crash context.
|
||||||
|
@ -83,7 +75,6 @@ core_init_fail:
|
||||||
ret
|
ret
|
||||||
endfunc console_pl011_core_init
|
endfunc console_pl011_core_init
|
||||||
|
|
||||||
#if MULTI_CONSOLE_API
|
|
||||||
.globl console_pl011_register
|
.globl console_pl011_register
|
||||||
|
|
||||||
/* -----------------------------------------------
|
/* -----------------------------------------------
|
||||||
|
@ -117,16 +108,6 @@ func console_pl011_register
|
||||||
register_fail:
|
register_fail:
|
||||||
ret x7
|
ret x7
|
||||||
endfunc console_pl011_register
|
endfunc console_pl011_register
|
||||||
#else
|
|
||||||
.globl console_core_init
|
|
||||||
.globl console_core_putc
|
|
||||||
.globl console_core_getc
|
|
||||||
.globl console_core_flush
|
|
||||||
.equ console_core_init,console_pl011_core_init
|
|
||||||
.equ console_core_putc,console_pl011_core_putc
|
|
||||||
.equ console_core_getc,console_pl011_core_getc
|
|
||||||
.equ console_core_flush,console_pl011_core_flush
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* --------------------------------------------------------
|
/* --------------------------------------------------------
|
||||||
* int console_pl011_core_putc(int c, uintptr_t base_addr)
|
* int console_pl011_core_putc(int c, uintptr_t base_addr)
|
||||||
|
|
|
@ -51,7 +51,6 @@ core_init_fail:
|
||||||
ret
|
ret
|
||||||
endfunc console_cdns_core_init
|
endfunc console_cdns_core_init
|
||||||
|
|
||||||
#if MULTI_CONSOLE_API
|
|
||||||
.globl console_cdns_register
|
.globl console_cdns_register
|
||||||
|
|
||||||
/* -----------------------------------------------
|
/* -----------------------------------------------
|
||||||
|
@ -85,16 +84,6 @@ func console_cdns_register
|
||||||
register_fail:
|
register_fail:
|
||||||
ret x7
|
ret x7
|
||||||
endfunc console_cdns_register
|
endfunc console_cdns_register
|
||||||
#else
|
|
||||||
.globl console_core_init
|
|
||||||
.globl console_core_putc
|
|
||||||
.globl console_core_getc
|
|
||||||
.globl console_core_flush
|
|
||||||
.equ console_core_init,console_cdns_core_init
|
|
||||||
.equ console_core_putc,console_cdns_core_putc
|
|
||||||
.equ console_core_getc,console_cdns_core_getc
|
|
||||||
.equ console_core_flush,console_cdns_core_flush
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* --------------------------------------------------------
|
/* --------------------------------------------------------
|
||||||
* int console_cdns_core_putc(int c, uintptr_t base_addr)
|
* int console_cdns_core_putc(int c, uintptr_t base_addr)
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved.
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if MULTI_CONSOLE_API
|
|
||||||
#if ERROR_DEPRECATED
|
|
||||||
#error "console.S is deprecated, platforms should no longer link it explicitly"
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#include "deprecated_console.S"
|
|
||||||
#endif
|
|
|
@ -1,112 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved.
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
#include <asm_macros.S>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is the common console core code for the deprecated single-console API.
|
|
||||||
* New platforms should set MULTI_CONSOLE_API=1 and not use this file.
|
|
||||||
*/
|
|
||||||
#warning "Using deprecated console implementation. Please migrate to MULTI_CONSOLE_API"
|
|
||||||
|
|
||||||
.globl console_init
|
|
||||||
.globl console_uninit
|
|
||||||
.globl console_putc
|
|
||||||
.globl console_getc
|
|
||||||
.globl console_flush
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The console base is in the data section and not in .bss
|
|
||||||
* even though it is zero-init. In particular, this allows
|
|
||||||
* the console functions to start using this variable before
|
|
||||||
* the runtime memory is initialized for images which do not
|
|
||||||
* need to copy the .data section from ROM to RAM.
|
|
||||||
*/
|
|
||||||
.section .data.console_base ; .align 2
|
|
||||||
console_base: .word 0x0
|
|
||||||
|
|
||||||
/* -----------------------------------------------
|
|
||||||
* int console_init(uintptr_t base_addr,
|
|
||||||
* unsigned int uart_clk, unsigned int baud_rate)
|
|
||||||
* Function to initialize the console without a
|
|
||||||
* C Runtime to print debug information. It saves
|
|
||||||
* the console base to the data section.
|
|
||||||
* In: r0 - console base address
|
|
||||||
* r1 - Uart clock in Hz
|
|
||||||
* r2 - Baud rate
|
|
||||||
* out: return 1 on success else 0 on error
|
|
||||||
* Clobber list : r1 - r3
|
|
||||||
* -----------------------------------------------
|
|
||||||
*/
|
|
||||||
func console_init
|
|
||||||
/* Check the input base address */
|
|
||||||
cmp r0, #0
|
|
||||||
beq init_fail
|
|
||||||
ldr r3, =console_base
|
|
||||||
str r0, [r3]
|
|
||||||
b console_core_init
|
|
||||||
init_fail:
|
|
||||||
bx lr
|
|
||||||
endfunc console_init
|
|
||||||
|
|
||||||
/* -----------------------------------------------
|
|
||||||
* void console_uninit(void)
|
|
||||||
* Function to finish the use of console driver.
|
|
||||||
* It sets the console_base as NULL so that any
|
|
||||||
* further invocation of `console_putc` or
|
|
||||||
* `console_getc` APIs would return error.
|
|
||||||
* -----------------------------------------------
|
|
||||||
*/
|
|
||||||
func console_uninit
|
|
||||||
mov r0, #0
|
|
||||||
ldr r3, =console_base
|
|
||||||
str r0, [r3]
|
|
||||||
bx lr
|
|
||||||
endfunc console_uninit
|
|
||||||
|
|
||||||
/* ---------------------------------------------
|
|
||||||
* int console_putc(int c)
|
|
||||||
* Function to output a character over the
|
|
||||||
* console. It returns the character printed on
|
|
||||||
* success or -1 on error.
|
|
||||||
* In : r0 - character to be printed
|
|
||||||
* Out : return -1 on error else return character.
|
|
||||||
* Clobber list : r1, r2
|
|
||||||
* ---------------------------------------------
|
|
||||||
*/
|
|
||||||
func console_putc
|
|
||||||
ldr r2, =console_base
|
|
||||||
ldr r1, [r2]
|
|
||||||
b console_core_putc
|
|
||||||
endfunc console_putc
|
|
||||||
|
|
||||||
/* ---------------------------------------------
|
|
||||||
* int console_getc(void)
|
|
||||||
* Function to get a character from the console.
|
|
||||||
* It returns the character grabbed on success
|
|
||||||
* or -1 on error.
|
|
||||||
* Clobber list : r0, r1
|
|
||||||
* ---------------------------------------------
|
|
||||||
*/
|
|
||||||
func console_getc
|
|
||||||
ldr r1, =console_base
|
|
||||||
ldr r0, [r1]
|
|
||||||
b console_core_getc
|
|
||||||
endfunc console_getc
|
|
||||||
|
|
||||||
/* ---------------------------------------------
|
|
||||||
* int console_flush(void)
|
|
||||||
* Function to force a write of all buffered
|
|
||||||
* data that hasn't been output. It returns 0
|
|
||||||
* upon successful completion, otherwise it
|
|
||||||
* returns -1.
|
|
||||||
* Clobber list : r0, r1
|
|
||||||
* ---------------------------------------------
|
|
||||||
*/
|
|
||||||
func console_flush
|
|
||||||
ldr r1, =console_base
|
|
||||||
ldr r0, [r1]
|
|
||||||
b console_core_flush
|
|
||||||
endfunc console_flush
|
|
|
@ -1,13 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if MULTI_CONSOLE_API
|
|
||||||
#if ERROR_DEPRECATED
|
|
||||||
#error "console.S is deprecated, platforms should no longer link it explicitly"
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#include "deprecated_console.S"
|
|
||||||
#endif
|
|
|
@ -1,111 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
#include <asm_macros.S>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is the common console core code for the deprecated single-console API.
|
|
||||||
* New platforms should set MULTI_CONSOLE_API=1 and not use this file.
|
|
||||||
*/
|
|
||||||
#warning "Using deprecated console implementation. Please migrate to MULTI_CONSOLE_API"
|
|
||||||
|
|
||||||
.globl console_init
|
|
||||||
.globl console_uninit
|
|
||||||
.globl console_putc
|
|
||||||
.globl console_getc
|
|
||||||
.globl console_flush
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The console base is in the data section and not in .bss
|
|
||||||
* even though it is zero-init. In particular, this allows
|
|
||||||
* the console functions to start using this variable before
|
|
||||||
* the runtime memory is initialized for images which do not
|
|
||||||
* need to copy the .data section from ROM to RAM.
|
|
||||||
*/
|
|
||||||
.section .data.console_base ; .align 3
|
|
||||||
console_base: .quad 0x0
|
|
||||||
|
|
||||||
/* -----------------------------------------------
|
|
||||||
* int console_init(uintptr_t base_addr,
|
|
||||||
* unsigned int uart_clk, unsigned int baud_rate)
|
|
||||||
* Function to initialize the console without a
|
|
||||||
* C Runtime to print debug information. It saves
|
|
||||||
* the console base to the data section.
|
|
||||||
* In: x0 - console base address
|
|
||||||
* w1 - Uart clock in Hz
|
|
||||||
* w2 - Baud rate
|
|
||||||
* out: return 1 on success else 0 on error
|
|
||||||
* Clobber list : x1 - x4
|
|
||||||
* -----------------------------------------------
|
|
||||||
*/
|
|
||||||
func console_init
|
|
||||||
/* Check the input base address */
|
|
||||||
cbz x0, init_fail
|
|
||||||
adrp x3, console_base
|
|
||||||
str x0, [x3, :lo12:console_base]
|
|
||||||
b console_core_init
|
|
||||||
init_fail:
|
|
||||||
ret
|
|
||||||
endfunc console_init
|
|
||||||
|
|
||||||
/* -----------------------------------------------
|
|
||||||
* void console_uninit(void)
|
|
||||||
* Function to finish the use of console driver.
|
|
||||||
* It sets the console_base as NULL so that any
|
|
||||||
* further invocation of `console_putc` or
|
|
||||||
* `console_getc` APIs would return error.
|
|
||||||
* -----------------------------------------------
|
|
||||||
*/
|
|
||||||
func console_uninit
|
|
||||||
mov x0, #0
|
|
||||||
adrp x3, console_base
|
|
||||||
str x0, [x3, :lo12:console_base]
|
|
||||||
ret
|
|
||||||
endfunc console_uninit
|
|
||||||
|
|
||||||
/* ---------------------------------------------
|
|
||||||
* int console_putc(int c)
|
|
||||||
* Function to output a character over the
|
|
||||||
* console. It returns the character printed on
|
|
||||||
* success or -1 on error.
|
|
||||||
* In : x0 - character to be printed
|
|
||||||
* Out : return -1 on error else return character.
|
|
||||||
* Clobber list : x1, x2
|
|
||||||
* ---------------------------------------------
|
|
||||||
*/
|
|
||||||
func console_putc
|
|
||||||
adrp x2, console_base
|
|
||||||
ldr x1, [x2, :lo12:console_base]
|
|
||||||
b console_core_putc
|
|
||||||
endfunc console_putc
|
|
||||||
|
|
||||||
/* ---------------------------------------------
|
|
||||||
* int console_getc(void)
|
|
||||||
* Function to get a character from the console.
|
|
||||||
* It returns the character grabbed on success
|
|
||||||
* or -1 on error.
|
|
||||||
* Clobber list : x0, x1
|
|
||||||
* ---------------------------------------------
|
|
||||||
*/
|
|
||||||
func console_getc
|
|
||||||
adrp x1, console_base
|
|
||||||
ldr x0, [x1, :lo12:console_base]
|
|
||||||
b console_core_getc
|
|
||||||
endfunc console_getc
|
|
||||||
|
|
||||||
/* ---------------------------------------------
|
|
||||||
* int console_flush(void)
|
|
||||||
* Function to force a write of all buffered
|
|
||||||
* data that hasn't been output. It returns 0
|
|
||||||
* upon successful completion, otherwise it
|
|
||||||
* returns -1.
|
|
||||||
* Clobber list : x0, x1
|
|
||||||
* ---------------------------------------------
|
|
||||||
*/
|
|
||||||
func console_flush
|
|
||||||
adrp x1, console_base
|
|
||||||
ldr x0, [x1, :lo12:console_base]
|
|
||||||
b console_core_flush
|
|
||||||
endfunc console_flush
|
|
|
@ -22,8 +22,6 @@
|
||||||
* any function may always clobber the intra-procedure-call registers
|
* any function may always clobber the intra-procedure-call registers
|
||||||
* X16 and X17, but may never depend on them retaining their values
|
* X16 and X17, but may never depend on them retaining their values
|
||||||
* across any function call.)
|
* across any function call.)
|
||||||
* Platforms using drivers based on this template need to enable
|
|
||||||
* MULTI_CONSOLE_API := 1 in their platform.mk.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.globl console_xxx_register
|
.globl console_xxx_register
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if MULTI_CONSOLE_API
|
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include <drivers/console.h>
|
#include <drivers/console.h>
|
||||||
|
@ -121,5 +119,3 @@ int console_flush(void)
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* MULTI_CONSOLE_API */
|
|
||||||
|
|
|
@ -83,7 +83,6 @@ init_fail:
|
||||||
ret
|
ret
|
||||||
endfunc console_16550_core_init
|
endfunc console_16550_core_init
|
||||||
|
|
||||||
#if MULTI_CONSOLE_API
|
|
||||||
.globl console_16550_register
|
.globl console_16550_register
|
||||||
|
|
||||||
/* -----------------------------------------------
|
/* -----------------------------------------------
|
||||||
|
@ -117,16 +116,6 @@ func console_16550_register
|
||||||
register_fail:
|
register_fail:
|
||||||
ret x7
|
ret x7
|
||||||
endfunc console_16550_register
|
endfunc console_16550_register
|
||||||
#else
|
|
||||||
.globl console_core_init
|
|
||||||
.globl console_core_putc
|
|
||||||
.globl console_core_getc
|
|
||||||
.globl console_core_flush
|
|
||||||
.equ console_core_init,console_16550_core_init
|
|
||||||
.equ console_core_putc,console_16550_core_putc
|
|
||||||
.equ console_core_getc,console_16550_core_getc
|
|
||||||
.equ console_core_flush,console_16550_core_flush
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* --------------------------------------------------------
|
/* --------------------------------------------------------
|
||||||
* int console_16550_core_putc(int c, uintptr_t base_addr)
|
* int console_16550_core_putc(int c, uintptr_t base_addr)
|
||||||
|
|
|
@ -75,13 +75,6 @@ int console_getc(void);
|
||||||
/* Flush all consoles registered for the current state. */
|
/* Flush all consoles registered for the current state. */
|
||||||
int console_flush(void);
|
int console_flush(void);
|
||||||
|
|
||||||
#if !MULTI_CONSOLE_API
|
|
||||||
/* REMOVED on AArch64 -- use console_<driver>_register() instead! */
|
|
||||||
int console_init(uintptr_t base_addr,
|
|
||||||
unsigned int uart_clk, unsigned int baud_rate);
|
|
||||||
void console_uninit(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|
||||||
#endif /* CONSOLE_H */
|
#endif /* CONSOLE_H */
|
||||||
|
|
|
@ -136,10 +136,6 @@ HW_ASSISTED_COHERENCY := 0
|
||||||
# Set the default algorithm for the generation of Trusted Board Boot keys
|
# Set the default algorithm for the generation of Trusted Board Boot keys
|
||||||
KEY_ALG := rsa
|
KEY_ALG := rsa
|
||||||
|
|
||||||
# Enable use of the console API allowing multiple consoles to be registered
|
|
||||||
# at the same time.
|
|
||||||
MULTI_CONSOLE_API := 0
|
|
||||||
|
|
||||||
# NS timer register save and restore
|
# NS timer register save and restore
|
||||||
NS_TIMER_SWITCH := 0
|
NS_TIMER_SWITCH := 0
|
||||||
|
|
||||||
|
|
|
@ -49,8 +49,6 @@ ERRATA_A53_835769 := 1
|
||||||
ERRATA_A53_843419 := 1
|
ERRATA_A53_843419 := 1
|
||||||
ERRATA_A53_855873 := 1
|
ERRATA_A53_855873 := 1
|
||||||
|
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
|
|
||||||
# The reset vector can be changed for each CPU.
|
# The reset vector can be changed for each CPU.
|
||||||
PROGRAMMABLE_RESET_ADDRESS := 1
|
PROGRAMMABLE_RESET_ADDRESS := 1
|
||||||
|
|
||||||
|
|
|
@ -106,8 +106,6 @@ endif
|
||||||
$(eval $(call assert_boolean,ARM_XLAT_TABLES_LIB_V1))
|
$(eval $(call assert_boolean,ARM_XLAT_TABLES_LIB_V1))
|
||||||
$(eval $(call add_define,ARM_XLAT_TABLES_LIB_V1))
|
$(eval $(call add_define,ARM_XLAT_TABLES_LIB_V1))
|
||||||
|
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
|
|
||||||
ifeq (${ARM_XLAT_TABLES_LIB_V1}, 1)
|
ifeq (${ARM_XLAT_TABLES_LIB_V1}, 1)
|
||||||
# Only use nonlpae version of xlatv1 otherwise use xlat v2
|
# Only use nonlpae version of xlatv1 otherwise use xlat v2
|
||||||
PLAT_BL_COMMON_SOURCES += lib/xlat_tables/${ARCH}/nonlpae_tables.c
|
PLAT_BL_COMMON_SOURCES += lib/xlat_tables/${ARCH}/nonlpae_tables.c
|
||||||
|
|
|
@ -240,11 +240,7 @@ void arm_bl31_platform_setup(void)
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
void arm_bl31_plat_runtime_setup(void)
|
void arm_bl31_plat_runtime_setup(void)
|
||||||
{
|
{
|
||||||
#if MULTI_CONSOLE_API
|
|
||||||
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
||||||
#else
|
|
||||||
console_uninit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the runtime console */
|
/* Initialize the runtime console */
|
||||||
arm_console_runtime_init();
|
arm_console_runtime_init();
|
||||||
|
|
|
@ -125,9 +125,6 @@ ENABLE_PMF := 1
|
||||||
# mapping the former as executable and the latter as execute-never.
|
# mapping the former as executable and the latter as execute-never.
|
||||||
SEPARATE_CODE_AND_RODATA := 1
|
SEPARATE_CODE_AND_RODATA := 1
|
||||||
|
|
||||||
# Use the multi console API, which is only available for AArch64 for now
|
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
|
|
||||||
# Disable ARM Cryptocell by default
|
# Disable ARM Cryptocell by default
|
||||||
ARM_CRYPTOCELL_INTEG := 0
|
ARM_CRYPTOCELL_INTEG := 0
|
||||||
$(eval $(call assert_boolean,ARM_CRYPTOCELL_INTEG))
|
$(eval $(call assert_boolean,ARM_CRYPTOCELL_INTEG))
|
||||||
|
|
|
@ -16,15 +16,12 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Functions that set up the console
|
* Functions that set up the console
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
#if MULTI_CONSOLE_API
|
|
||||||
static console_pl011_t arm_boot_console;
|
static console_pl011_t arm_boot_console;
|
||||||
static console_pl011_t arm_runtime_console;
|
static console_pl011_t arm_runtime_console;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the console to provide early debug support */
|
/* Initialize the console to provide early debug support */
|
||||||
void __init arm_console_boot_init(void)
|
void __init arm_console_boot_init(void)
|
||||||
{
|
{
|
||||||
#if MULTI_CONSOLE_API
|
|
||||||
int rc = console_pl011_register(PLAT_ARM_BOOT_UART_BASE,
|
int rc = console_pl011_register(PLAT_ARM_BOOT_UART_BASE,
|
||||||
PLAT_ARM_BOOT_UART_CLK_IN_HZ,
|
PLAT_ARM_BOOT_UART_CLK_IN_HZ,
|
||||||
ARM_CONSOLE_BAUDRATE,
|
ARM_CONSOLE_BAUDRATE,
|
||||||
|
@ -39,28 +36,17 @@ void __init arm_console_boot_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
console_set_scope(&arm_boot_console.console, CONSOLE_FLAG_BOOT);
|
console_set_scope(&arm_boot_console.console, CONSOLE_FLAG_BOOT);
|
||||||
#else
|
|
||||||
(void)console_init(PLAT_ARM_BOOT_UART_BASE,
|
|
||||||
PLAT_ARM_BOOT_UART_CLK_IN_HZ,
|
|
||||||
ARM_CONSOLE_BAUDRATE);
|
|
||||||
#endif /* MULTI_CONSOLE_API */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void arm_console_boot_end(void)
|
void arm_console_boot_end(void)
|
||||||
{
|
{
|
||||||
(void)console_flush();
|
(void)console_flush();
|
||||||
|
|
||||||
#if MULTI_CONSOLE_API
|
|
||||||
(void)console_unregister(&arm_boot_console.console);
|
(void)console_unregister(&arm_boot_console.console);
|
||||||
#else
|
|
||||||
console_uninit();
|
|
||||||
#endif /* MULTI_CONSOLE_API */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize the runtime console */
|
/* Initialize the runtime console */
|
||||||
void arm_console_runtime_init(void)
|
void arm_console_runtime_init(void)
|
||||||
{
|
{
|
||||||
#if MULTI_CONSOLE_API
|
|
||||||
int rc = console_pl011_register(PLAT_ARM_RUN_UART_BASE,
|
int rc = console_pl011_register(PLAT_ARM_RUN_UART_BASE,
|
||||||
PLAT_ARM_RUN_UART_CLK_IN_HZ,
|
PLAT_ARM_RUN_UART_CLK_IN_HZ,
|
||||||
ARM_CONSOLE_BAUDRATE,
|
ARM_CONSOLE_BAUDRATE,
|
||||||
|
@ -69,18 +55,9 @@ void arm_console_runtime_init(void)
|
||||||
panic();
|
panic();
|
||||||
|
|
||||||
console_set_scope(&arm_runtime_console.console, CONSOLE_FLAG_RUNTIME);
|
console_set_scope(&arm_runtime_console.console, CONSOLE_FLAG_RUNTIME);
|
||||||
#else
|
|
||||||
(void)console_init(PLAT_ARM_RUN_UART_BASE,
|
|
||||||
PLAT_ARM_RUN_UART_CLK_IN_HZ,
|
|
||||||
ARM_CONSOLE_BAUDRATE);
|
|
||||||
#endif /* MULTI_CONSOLE_API */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void arm_console_runtime_end(void)
|
void arm_console_runtime_end(void)
|
||||||
{
|
{
|
||||||
(void)console_flush();
|
(void)console_flush();
|
||||||
|
|
||||||
#if !MULTI_CONSOLE_API
|
|
||||||
console_uninit();
|
|
||||||
#endif /* !MULTI_CONSOLE_API */
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,13 +28,10 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Initialize the UART
|
* Initialize the UART
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
#if MULTI_CONSOLE_API
|
|
||||||
static console_pl011_t arm_tsp_runtime_console;
|
static console_pl011_t arm_tsp_runtime_console;
|
||||||
#endif
|
|
||||||
|
|
||||||
void arm_tsp_early_platform_setup(void)
|
void arm_tsp_early_platform_setup(void)
|
||||||
{
|
{
|
||||||
#if MULTI_CONSOLE_API
|
|
||||||
/*
|
/*
|
||||||
* Initialize a different console than already in use to display
|
* Initialize a different console than already in use to display
|
||||||
* messages from TSP
|
* messages from TSP
|
||||||
|
@ -48,10 +45,6 @@ void arm_tsp_early_platform_setup(void)
|
||||||
|
|
||||||
console_set_scope(&arm_tsp_runtime_console.console,
|
console_set_scope(&arm_tsp_runtime_console.console,
|
||||||
CONSOLE_FLAG_BOOT | CONSOLE_FLAG_RUNTIME);
|
CONSOLE_FLAG_BOOT | CONSOLE_FLAG_RUNTIME);
|
||||||
#else
|
|
||||||
console_init(PLAT_ARM_TSP_UART_BASE, PLAT_ARM_TSP_UART_CLK_IN_HZ,
|
|
||||||
ARM_CONSOLE_BAUDRATE);
|
|
||||||
#endif /* MULTI_CONSOLE_API */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void tsp_early_platform_setup(void)
|
void tsp_early_platform_setup(void)
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
.globl plat_crash_console_putc
|
.globl plat_crash_console_putc
|
||||||
.globl plat_crash_console_flush
|
.globl plat_crash_console_flush
|
||||||
|
|
||||||
#if MULTI_CONSOLE_API
|
|
||||||
|
|
||||||
/* -----------------------------------------------------
|
/* -----------------------------------------------------
|
||||||
* int plat_crash_console_init(void)
|
* int plat_crash_console_init(void)
|
||||||
* Use normal console by default. Switch it to crash
|
* Use normal console by default. Switch it to crash
|
||||||
|
@ -68,25 +66,3 @@ endfunc plat_crash_console_putc
|
||||||
func plat_crash_console_flush
|
func plat_crash_console_flush
|
||||||
b console_flush
|
b console_flush
|
||||||
endfunc plat_crash_console_flush
|
endfunc plat_crash_console_flush
|
||||||
|
|
||||||
#else /* MULTI_CONSOLE_API */
|
|
||||||
|
|
||||||
/* -----------------------------------------------------
|
|
||||||
* In the old API these are all no-op stubs that need to
|
|
||||||
* be overridden by the platform to be useful.
|
|
||||||
* -----------------------------------------------------
|
|
||||||
*/
|
|
||||||
func plat_crash_console_init
|
|
||||||
mov r0, #0
|
|
||||||
bx lr
|
|
||||||
endfunc plat_crash_console_init
|
|
||||||
|
|
||||||
func plat_crash_console_putc
|
|
||||||
bx lr
|
|
||||||
endfunc plat_crash_console_putc
|
|
||||||
|
|
||||||
func plat_crash_console_flush
|
|
||||||
bx lr
|
|
||||||
endfunc plat_crash_console_flush
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -21,9 +21,5 @@ void sp_min_plat_runtime_setup(void)
|
||||||
* Finish the use of console driver in SP_MIN so that any runtime logs
|
* Finish the use of console driver in SP_MIN so that any runtime logs
|
||||||
* from SP_MIN will be suppressed.
|
* from SP_MIN will be suppressed.
|
||||||
*/
|
*/
|
||||||
#if MULTI_CONSOLE_API
|
|
||||||
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
||||||
#else
|
|
||||||
console_uninit();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,10 +16,6 @@
|
||||||
.globl plat_crash_console_putc
|
.globl plat_crash_console_putc
|
||||||
.globl plat_crash_console_flush
|
.globl plat_crash_console_flush
|
||||||
|
|
||||||
#if !MULTI_CONSOLE_API
|
|
||||||
#error "This crash console implementation only works with the MULTI_CONSOLE_API!"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Spinlock to syncronize access to crash_console_triggered. We cannot
|
* Spinlock to syncronize access to crash_console_triggered. We cannot
|
||||||
* acquire spinlocks when the cache is disabled, so in some cases (like
|
* acquire spinlocks when the cache is disabled, so in some cases (like
|
||||||
|
|
|
@ -30,11 +30,7 @@
|
||||||
|
|
||||||
void bl31_plat_runtime_setup(void)
|
void bl31_plat_runtime_setup(void)
|
||||||
{
|
{
|
||||||
#if MULTI_CONSOLE_API
|
|
||||||
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
||||||
#else
|
|
||||||
console_uninit();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -20,7 +20,6 @@ endif
|
||||||
|
|
||||||
CONSOLE_BASE := PL011_UART3_BASE
|
CONSOLE_BASE := PL011_UART3_BASE
|
||||||
CRASH_CONSOLE_BASE := PL011_UART3_BASE
|
CRASH_CONSOLE_BASE := PL011_UART3_BASE
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
PLAT_PARTITION_MAX_ENTRIES := 12
|
PLAT_PARTITION_MAX_ENTRIES := 12
|
||||||
PLAT_PL061_MAX_GPIOS := 160
|
PLAT_PL061_MAX_GPIOS := 160
|
||||||
COLD_BOOT_SINGLE_CPU := 1
|
COLD_BOOT_SINGLE_CPU := 1
|
||||||
|
|
|
@ -17,7 +17,6 @@ else
|
||||||
$(error "Currently unsupported HIKEY960_TSP_RAM_LOCATION value")
|
$(error "Currently unsupported HIKEY960_TSP_RAM_LOCATION value")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
CRASH_CONSOLE_BASE := PL011_UART6_BASE
|
CRASH_CONSOLE_BASE := PL011_UART6_BASE
|
||||||
COLD_BOOT_SINGLE_CPU := 1
|
COLD_BOOT_SINGLE_CPU := 1
|
||||||
PLAT_PL061_MAX_GPIOS := 176
|
PLAT_PL061_MAX_GPIOS := 176
|
||||||
|
|
|
@ -46,7 +46,6 @@ ERRATA_A53_855873 := 1
|
||||||
ERRATA_A53_835769 := 1
|
ERRATA_A53_835769 := 1
|
||||||
ERRATA_A53_843419 := 1
|
ERRATA_A53_843419 := 1
|
||||||
ENABLE_SVE_FOR_NS := 0
|
ENABLE_SVE_FOR_NS := 0
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
WORKAROUND_CVE_2017_5715 := 0
|
WORKAROUND_CVE_2017_5715 := 0
|
||||||
|
|
||||||
PLAT_PL061_MAX_GPIOS := 104
|
PLAT_PL061_MAX_GPIOS := 104
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
|
# Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
#
|
#
|
||||||
|
@ -31,7 +31,6 @@ PLAT_INCLUDES := -Idrivers/imx/uart \
|
||||||
include lib/xlat_tables_v2/xlat_tables.mk
|
include lib/xlat_tables_v2/xlat_tables.mk
|
||||||
|
|
||||||
BL2_SOURCES += common/desc_image_load.c \
|
BL2_SOURCES += common/desc_image_load.c \
|
||||||
drivers/console/aarch32/console.S \
|
|
||||||
drivers/delay_timer/delay_timer.c \
|
drivers/delay_timer/delay_timer.c \
|
||||||
drivers/mmc/mmc.c \
|
drivers/mmc/mmc.c \
|
||||||
drivers/io/io_block.c \
|
drivers/io/io_block.c \
|
||||||
|
@ -119,9 +118,6 @@ SEPARATE_CODE_AND_RODATA := 1
|
||||||
# Use Coherent memory
|
# Use Coherent memory
|
||||||
USE_COHERENT_MEM := 1
|
USE_COHERENT_MEM := 1
|
||||||
|
|
||||||
# Use multi console API
|
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
|
|
||||||
# PLAT_WARP7_UART
|
# PLAT_WARP7_UART
|
||||||
PLAT_WARP7_UART :=1
|
PLAT_WARP7_UART :=1
|
||||||
$(eval $(call add_define,PLAT_WARP7_UART))
|
$(eval $(call add_define,PLAT_WARP7_UART))
|
||||||
|
|
|
@ -39,7 +39,6 @@ BL31_SOURCES += plat/imx/common/imx8_helpers.S \
|
||||||
USE_COHERENT_MEM := 1
|
USE_COHERENT_MEM := 1
|
||||||
RESET_TO_BL31 := 1
|
RESET_TO_BL31 := 1
|
||||||
A53_DISABLE_NON_TEMPORAL_HINT := 0
|
A53_DISABLE_NON_TEMPORAL_HINT := 0
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
|
|
||||||
ERRATA_A53_835769 := 1
|
ERRATA_A53_835769 := 1
|
||||||
ERRATA_A53_843419 := 1
|
ERRATA_A53_843419 := 1
|
||||||
|
|
|
@ -39,7 +39,6 @@ BL31_SOURCES += plat/imx/common/imx8_helpers.S \
|
||||||
USE_COHERENT_MEM := 1
|
USE_COHERENT_MEM := 1
|
||||||
RESET_TO_BL31 := 1
|
RESET_TO_BL31 := 1
|
||||||
A53_DISABLE_NON_TEMPORAL_HINT := 0
|
A53_DISABLE_NON_TEMPORAL_HINT := 0
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
|
|
||||||
ERRATA_A53_835769 := 1
|
ERRATA_A53_835769 := 1
|
||||||
ERRATA_A53_843419 := 1
|
ERRATA_A53_843419 := 1
|
||||||
|
|
|
@ -36,7 +36,6 @@ include plat/imx/common/sci/sci_api.mk
|
||||||
USE_COHERENT_MEM := 1
|
USE_COHERENT_MEM := 1
|
||||||
RESET_TO_BL31 := 1
|
RESET_TO_BL31 := 1
|
||||||
A53_DISABLE_NON_TEMPORAL_HINT := 0
|
A53_DISABLE_NON_TEMPORAL_HINT := 0
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
ERRATA_A72_859971 := 1
|
ERRATA_A72_859971 := 1
|
||||||
|
|
||||||
ERRATA_A53_835769 := 1
|
ERRATA_A53_835769 := 1
|
||||||
|
|
|
@ -33,4 +33,3 @@ include plat/imx/common/sci/sci_api.mk
|
||||||
|
|
||||||
USE_COHERENT_MEM := 1
|
USE_COHERENT_MEM := 1
|
||||||
RESET_TO_BL31 := 1
|
RESET_TO_BL31 := 1
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
|
|
|
@ -68,5 +68,4 @@ BL31_SOURCES += drivers/arm/cci/cci.c \
|
||||||
|
|
||||||
PROGRAMMABLE_RESET_ADDRESS := 0
|
PROGRAMMABLE_RESET_ADDRESS := 0
|
||||||
BL2_AT_EL3 := 1
|
BL2_AT_EL3 := 1
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
USE_COHERENT_MEM := 1
|
USE_COHERENT_MEM := 1
|
||||||
|
|
|
@ -56,9 +56,6 @@ BL31_SOURCES += plat/layerscape/board/ls1043/ls1043_bl31_setup.c \
|
||||||
${LS1043_INTERCONNECT_SOURCES} \
|
${LS1043_INTERCONNECT_SOURCES} \
|
||||||
${LS1043_SECURITY_SOURCES}
|
${LS1043_SECURITY_SOURCES}
|
||||||
|
|
||||||
# Disable the PSCI platform compatibility layer
|
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
|
|
||||||
# Enable workarounds for selected Cortex-A53 erratas.
|
# Enable workarounds for selected Cortex-A53 erratas.
|
||||||
ERRATA_A53_855873 := 1
|
ERRATA_A53_855873 := 1
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,6 @@ init_fail:
|
||||||
ret
|
ret
|
||||||
endfunc console_ls_16550_core_init
|
endfunc console_ls_16550_core_init
|
||||||
|
|
||||||
#if MULTI_CONSOLE_API
|
|
||||||
.globl console_ls_16550_register
|
.globl console_ls_16550_register
|
||||||
|
|
||||||
/* -----------------------------------------------
|
/* -----------------------------------------------
|
||||||
|
@ -111,16 +110,6 @@ func console_ls_16550_register
|
||||||
register_fail:
|
register_fail:
|
||||||
ret x7
|
ret x7
|
||||||
endfunc console_ls_16550_register
|
endfunc console_ls_16550_register
|
||||||
#else
|
|
||||||
.globl console_core_init
|
|
||||||
.globl console_core_putc
|
|
||||||
.globl console_core_getc
|
|
||||||
.globl console_core_flush
|
|
||||||
.equ console_core_init,console_ls_16550_core_init
|
|
||||||
.equ console_core_putc,console_ls_16550_core_putc
|
|
||||||
.equ console_core_getc,console_ls_16550_core_getc
|
|
||||||
.equ console_core_flush,console_ls_16550_core_flush
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* --------------------------------------------------------
|
/* --------------------------------------------------------
|
||||||
* int console_ls_16550_core_putc(int c, uintptr_t base_addr)
|
* int console_ls_16550_core_putc(int c, uintptr_t base_addr)
|
||||||
|
|
|
@ -49,7 +49,6 @@ endfunc plat_ls_calc_core_pos
|
||||||
* ---------------------------------------------
|
* ---------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if MULTI_CONSOLE_API
|
|
||||||
/* -----------------------------------------------------
|
/* -----------------------------------------------------
|
||||||
* int plat_crash_console_init(void)
|
* int plat_crash_console_init(void)
|
||||||
* Use normal console by default. Switch it to crash
|
* Use normal console by default. Switch it to crash
|
||||||
|
@ -101,45 +100,6 @@ func plat_crash_console_flush
|
||||||
b console_flush
|
b console_flush
|
||||||
endfunc plat_crash_console_flush
|
endfunc plat_crash_console_flush
|
||||||
|
|
||||||
#else /* MULTI_CONSOLE_API */
|
|
||||||
|
|
||||||
/* -----------------------------------------------------
|
|
||||||
* In the old API these are all no-op stubs that need to
|
|
||||||
* be overridden by the platform to be useful.
|
|
||||||
* -----------------------------------------------------
|
|
||||||
*/
|
|
||||||
func plat_crash_console_init
|
|
||||||
mov_imm x0, PLAT_LS1043_UART_BASE
|
|
||||||
mov_imm x1, PLAT_LS1043_UART_CLOCK
|
|
||||||
mov_imm x2, PLAT_LS1043_UART_BAUDRATE
|
|
||||||
b console_core_init
|
|
||||||
endfunc plat_crash_console_init
|
|
||||||
|
|
||||||
/* ---------------------------------------------
|
|
||||||
* int plat_crash_console_putc(int c)
|
|
||||||
* Function to print a character on the crash
|
|
||||||
* console without a C Runtime.
|
|
||||||
* Clobber list : x1, x2
|
|
||||||
* ---------------------------------------------
|
|
||||||
*/
|
|
||||||
func plat_crash_console_putc
|
|
||||||
mov_imm x1, PLAT_LS1043_UART_BASE
|
|
||||||
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 : r0 - r1
|
|
||||||
* ---------------------------------------------
|
|
||||||
*/
|
|
||||||
func plat_crash_console_flush
|
|
||||||
mov_imm x1, PLAT_LS1043_UART_BASE
|
|
||||||
b console_core_flush
|
|
||||||
endfunc plat_crash_console_flush
|
|
||||||
#endif
|
|
||||||
/* ---------------------------------------------------------------------
|
/* ---------------------------------------------------------------------
|
||||||
* We don't need to carry out any memory initialization on LS
|
* We don't need to carry out any memory initialization on LS
|
||||||
* platforms. The Secure SRAM is accessible straight away.
|
* platforms. The Secure SRAM is accessible straight away.
|
||||||
|
|
|
@ -11,8 +11,6 @@ include $(MARVELL_PLAT_BASE)/marvell.mk
|
||||||
|
|
||||||
VERSION_STRING +=(Marvell-${SUBVERSION})
|
VERSION_STRING +=(Marvell-${SUBVERSION})
|
||||||
|
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
|
|
||||||
SEPARATE_CODE_AND_RODATA := 1
|
SEPARATE_CODE_AND_RODATA := 1
|
||||||
|
|
||||||
# flag to switch from PLL to ARO
|
# flag to switch from PLL to ARO
|
||||||
|
|
|
@ -57,16 +57,9 @@ SEPARATE_CODE_AND_RODATA := 1
|
||||||
# Use Coherent memory
|
# Use Coherent memory
|
||||||
USE_COHERENT_MEM := 1
|
USE_COHERENT_MEM := 1
|
||||||
|
|
||||||
# Use multi console API
|
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
|
|
||||||
# Verify build config
|
# Verify build config
|
||||||
# -------------------
|
# -------------------
|
||||||
|
|
||||||
ifneq (${MULTI_CONSOLE_API}, 1)
|
|
||||||
$(error Error: gxbb needs MULTI_CONSOLE_API=1)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq (${RESET_TO_BL31}, 0)
|
ifneq (${RESET_TO_BL31}, 0)
|
||||||
$(error Error: gxbb needs RESET_TO_BL31=0)
|
$(error Error: gxbb needs RESET_TO_BL31=0)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -62,16 +62,9 @@ SEPARATE_CODE_AND_RODATA := 1
|
||||||
# Use Coherent memory
|
# Use Coherent memory
|
||||||
USE_COHERENT_MEM := 1
|
USE_COHERENT_MEM := 1
|
||||||
|
|
||||||
# Use multi console API
|
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
|
|
||||||
# Verify build config
|
# Verify build config
|
||||||
# -------------------
|
# -------------------
|
||||||
|
|
||||||
ifneq (${MULTI_CONSOLE_API}, 1)
|
|
||||||
$(error Error: gxl needs MULTI_CONSOLE_API=1)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq (${RESET_TO_BL31}, 0)
|
ifneq (${RESET_TO_BL31}, 0)
|
||||||
$(error Error: gxl needs RESET_TO_BL31=0)
|
$(error Error: gxl needs RESET_TO_BL31=0)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -103,7 +103,7 @@ func plat_crash_console_init
|
||||||
mov_imm r0, PLAT_QEMU_CRASH_UART_BASE
|
mov_imm r0, PLAT_QEMU_CRASH_UART_BASE
|
||||||
mov_imm r1, PLAT_QEMU_CRASH_UART_CLK_IN_HZ
|
mov_imm r1, PLAT_QEMU_CRASH_UART_CLK_IN_HZ
|
||||||
mov_imm r2, PLAT_QEMU_CONSOLE_BAUDRATE
|
mov_imm r2, PLAT_QEMU_CONSOLE_BAUDRATE
|
||||||
b console_core_init
|
b console_pl011_core_init
|
||||||
endfunc plat_crash_console_init
|
endfunc plat_crash_console_init
|
||||||
|
|
||||||
/* ---------------------------------------------
|
/* ---------------------------------------------
|
||||||
|
@ -115,7 +115,7 @@ endfunc plat_crash_console_init
|
||||||
*/
|
*/
|
||||||
func plat_crash_console_putc
|
func plat_crash_console_putc
|
||||||
mov_imm r1, PLAT_QEMU_CRASH_UART_BASE
|
mov_imm r1, PLAT_QEMU_CRASH_UART_BASE
|
||||||
b console_core_putc
|
b console_pl011_core_putc
|
||||||
endfunc plat_crash_console_putc
|
endfunc plat_crash_console_putc
|
||||||
|
|
||||||
/* ---------------------------------------------
|
/* ---------------------------------------------
|
||||||
|
@ -128,6 +128,6 @@ endfunc plat_crash_console_putc
|
||||||
*/
|
*/
|
||||||
func plat_crash_console_flush
|
func plat_crash_console_flush
|
||||||
mov_imm r0, PLAT_QEMU_CRASH_UART_BASE
|
mov_imm r0, PLAT_QEMU_CRASH_UART_BASE
|
||||||
b console_core_flush
|
b console_pl011_core_flush
|
||||||
endfunc plat_crash_console_flush
|
endfunc plat_crash_console_flush
|
||||||
|
|
||||||
|
|
|
@ -151,12 +151,6 @@ ifneq ($(ENABLE_STACK_PROTECTOR), 0)
|
||||||
PLAT_BL_COMMON_SOURCES += plat/qemu/qemu_stack_protector.c
|
PLAT_BL_COMMON_SOURCES += plat/qemu/qemu_stack_protector.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Use MULTI_CONSOLE_API by default only on AArch64
|
|
||||||
# as it is not yet supported on AArch32
|
|
||||||
ifeq ($(ARCH),aarch64)
|
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
endif
|
|
||||||
|
|
||||||
BL32_RAM_LOCATION := tdram
|
BL32_RAM_LOCATION := tdram
|
||||||
ifeq (${BL32_RAM_LOCATION}, tsram)
|
ifeq (${BL32_RAM_LOCATION}, tsram)
|
||||||
BL32_RAM_LOCATION_ID = SEC_SRAM_ID
|
BL32_RAM_LOCATION_ID = SEC_SRAM_ID
|
||||||
|
|
|
@ -9,23 +9,15 @@
|
||||||
#include <drivers/console.h>
|
#include <drivers/console.h>
|
||||||
#include <drivers/arm/pl011.h>
|
#include <drivers/arm/pl011.h>
|
||||||
|
|
||||||
#if MULTI_CONSOLE_API
|
|
||||||
static console_pl011_t console;
|
static console_pl011_t console;
|
||||||
#endif /* MULTI_CONSOLE_API */
|
|
||||||
|
|
||||||
void qemu_console_init(void)
|
void qemu_console_init(void)
|
||||||
{
|
{
|
||||||
#if MULTI_CONSOLE_API
|
|
||||||
(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_set_scope(&console.console, CONSOLE_FLAG_BOOT |
|
||||||
CONSOLE_FLAG_RUNTIME);
|
CONSOLE_FLAG_RUNTIME);
|
||||||
#else
|
|
||||||
console_init(PLAT_QEMU_BOOT_UART_BASE,
|
|
||||||
PLAT_QEMU_BOOT_UART_CLK_IN_HZ,
|
|
||||||
PLAT_QEMU_CONSOLE_BAUDRATE);
|
|
||||||
#endif /* MULTI_CONSOLE_API */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
|
* Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -93,8 +93,7 @@ void sp_min_early_platform_setup2(u_register_t arg0, u_register_t arg1,
|
||||||
bl_params_t *params_from_bl2 = (bl_params_t *)arg0;
|
bl_params_t *params_from_bl2 = (bl_params_t *)arg0;
|
||||||
|
|
||||||
/* Initialize the console to provide early debug support */
|
/* Initialize the console to provide early debug support */
|
||||||
console_init(PLAT_QEMU_BOOT_UART_BASE, PLAT_QEMU_BOOT_UART_CLK_IN_HZ,
|
qemu_console_init();
|
||||||
PLAT_QEMU_CONSOLE_BAUDRATE);
|
|
||||||
|
|
||||||
ERROR("qemu sp_min, console init\n");
|
ERROR("qemu sp_min, console init\n");
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -51,8 +51,6 @@ BL31_SOURCES += ${RK_GIC_SOURCES} \
|
||||||
${RK_PLAT_SOC}/drivers/pmu/pmu.c \
|
${RK_PLAT_SOC}/drivers/pmu/pmu.c \
|
||||||
${RK_PLAT_SOC}/drivers/soc/soc.c
|
${RK_PLAT_SOC}/drivers/soc/soc.c
|
||||||
|
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
|
|
||||||
include lib/coreboot/coreboot.mk
|
include lib/coreboot/coreboot.mk
|
||||||
include lib/libfdt/libfdt.mk
|
include lib/libfdt/libfdt.mk
|
||||||
|
|
||||||
|
|
|
@ -50,8 +50,6 @@ BL31_SOURCES += ${RK_GIC_SOURCES} \
|
||||||
${RK_PLAT_SOC}/drivers/soc/soc.c \
|
${RK_PLAT_SOC}/drivers/soc/soc.c \
|
||||||
${RK_PLAT_SOC}/drivers/ddr/ddr_rk3368.c \
|
${RK_PLAT_SOC}/drivers/ddr/ddr_rk3368.c \
|
||||||
|
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
|
|
||||||
include lib/coreboot/coreboot.mk
|
include lib/coreboot/coreboot.mk
|
||||||
include lib/libfdt/libfdt.mk
|
include lib/libfdt/libfdt.mk
|
||||||
|
|
||||||
|
|
|
@ -67,8 +67,6 @@ BL31_SOURCES += ${RK_GIC_SOURCES} \
|
||||||
${RK_PLAT_SOC}/drivers/dram/dram_spec_timing.c \
|
${RK_PLAT_SOC}/drivers/dram/dram_spec_timing.c \
|
||||||
${RK_PLAT_SOC}/drivers/dram/suspend.c
|
${RK_PLAT_SOC}/drivers/dram/suspend.c
|
||||||
|
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
|
|
||||||
include lib/coreboot/coreboot.mk
|
include lib/coreboot/coreboot.mk
|
||||||
include lib/libfdt/libfdt.mk
|
include lib/libfdt/libfdt.mk
|
||||||
|
|
||||||
|
|
|
@ -102,9 +102,6 @@ SEPARATE_CODE_AND_RODATA := 1
|
||||||
# Use Coherent memory
|
# Use Coherent memory
|
||||||
USE_COHERENT_MEM := 1
|
USE_COHERENT_MEM := 1
|
||||||
|
|
||||||
# Use multi console API
|
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
|
|
||||||
# Platform build flags
|
# Platform build flags
|
||||||
# --------------------
|
# --------------------
|
||||||
|
|
||||||
|
@ -152,10 +149,6 @@ ifneq (${RPI3_DIRECT_LINUX_BOOT}, 0)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (${MULTI_CONSOLE_API}, 1)
|
|
||||||
$(error Error: rpi3 needs MULTI_CONSOLE_API=1)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq (${RESET_TO_BL31}, 0)
|
ifneq (${RESET_TO_BL31}, 0)
|
||||||
$(error Error: rpi3 needs RESET_TO_BL31=0)
|
$(error Error: rpi3 needs RESET_TO_BL31=0)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
override RESET_TO_BL31 := 1
|
override RESET_TO_BL31 := 1
|
||||||
override MULTI_CONSOLE_API := 1
|
|
||||||
override PROGRAMMABLE_RESET_ADDRESS := 1
|
override PROGRAMMABLE_RESET_ADDRESS := 1
|
||||||
override USE_COHERENT_MEM := 1
|
override USE_COHERENT_MEM := 1
|
||||||
override SEPARATE_CODE_AND_RODATA := 1
|
override SEPARATE_CODE_AND_RODATA := 1
|
||||||
|
|
|
@ -8,7 +8,6 @@ ARM_CORTEX_A7 := yes
|
||||||
ARM_WITH_NEON := yes
|
ARM_WITH_NEON := yes
|
||||||
BL2_AT_EL3 := 1
|
BL2_AT_EL3 := 1
|
||||||
USE_COHERENT_MEM := 0
|
USE_COHERENT_MEM := 0
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
|
|
||||||
STM32_TF_VERSION ?= 0
|
STM32_TF_VERSION ?= 0
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@ ERRATA_A72_859971 := 1
|
||||||
# Split out RO data into a non-executable section
|
# Split out RO data into a non-executable section
|
||||||
SEPARATE_CODE_AND_RODATA := 1
|
SEPARATE_CODE_AND_RODATA := 1
|
||||||
|
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
TI_16550_MDR_QUIRK := 1
|
TI_16550_MDR_QUIRK := 1
|
||||||
$(eval $(call add_define,TI_16550_MDR_QUIRK))
|
$(eval $(call add_define,TI_16550_MDR_QUIRK))
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ A53_DISABLE_NON_TEMPORAL_HINT := 0
|
||||||
SEPARATE_CODE_AND_RODATA := 1
|
SEPARATE_CODE_AND_RODATA := 1
|
||||||
override RESET_TO_BL31 := 1
|
override RESET_TO_BL31 := 1
|
||||||
PL011_GENERIC_UART := 1
|
PL011_GENERIC_UART := 1
|
||||||
MULTI_CONSOLE_API := 1
|
|
||||||
|
|
||||||
ifdef VERSAL_ATF_MEM_BASE
|
ifdef VERSAL_ATF_MEM_BASE
|
||||||
$(eval $(call add_define,VERSAL_ATF_MEM_BASE))
|
$(eval $(call add_define,VERSAL_ATF_MEM_BASE))
|
||||||
|
|
Loading…
Reference in New Issue