summaryrefslogtreecommitdiff
path: root/bl2
diff options
context:
space:
mode:
authorYann Gautier <yann.gautier@st.com>2024-01-16 19:39:31 +0100
committerYann Gautier <yann.gautier@st.com>2024-04-24 15:44:28 +0200
commitae770fedf459d5643125d29f48659e3e936ebd2d (patch)
treec091c43acfb65ead64620131eb069c0c8d26ed85 /bl2
parenta1255c758593f9f6fb85b70165fad21de7491e1e (diff)
downloadarm-trusted-firmware-ae770fedf459d5643125d29f48659e3e936ebd2d.tar.gz
arm-trusted-firmware-ae770fedf459d5643125d29f48659e3e936ebd2d.zip
feat(console): introduce EARLY_CONSOLE
This is a generic porting of what was done on ST platforms with flag STM32MP_EARLY_CONSOLE. It creates the flag and the prototype for plat_setup_early_console(). This function depends on platform implementation. This function call is added at the beginning of each BL image early setup function. The patch also introduce an extra log macro: EARLY_ERROR. This can replace ERROR macro in code that will only be executed before the default console is enabled, and will do nothing when the EARLY_CONSOLE is not enabled. This can then save some space in memory. Signed-off-by: Yann Gautier <yann.gautier@st.com> Change-Id: I77bf0a0c4289b4c7df94e4bfb783a938e05bf023
Diffstat (limited to 'bl2')
-rw-r--r--bl2/bl2_main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/bl2/bl2_main.c b/bl2/bl2_main.c
index 923a554fb..3df0bfae2 100644
--- a/bl2/bl2_main.c
+++ b/bl2/bl2_main.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2023, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2024, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -41,6 +41,9 @@
void bl2_el3_setup(u_register_t arg0, u_register_t arg1, u_register_t arg2,
u_register_t arg3)
{
+ /* Enable early console if EARLY_CONSOLE flag is enabled */
+ plat_setup_early_console();
+
/* Perform early platform-specific setup */
bl2_el3_early_platform_setup(arg0, arg1, arg2, arg3);
@@ -63,6 +66,9 @@ void bl2_el3_setup(u_register_t arg0, u_register_t arg1, u_register_t arg2,
void bl2_setup(u_register_t arg0, u_register_t arg1, u_register_t arg2,
u_register_t arg3)
{
+ /* Enable early console if EARLY_CONSOLE flag is enabled */
+ plat_setup_early_console();
+
/* Perform early platform-specific setup */
bl2_early_platform_setup2(arg0, arg1, arg2, arg3);