From a1255c758593f9f6fb85b70165fad21de7491e1e Mon Sep 17 00:00:00 2001 From: Yann Gautier Date: Thu, 18 Jan 2024 18:20:43 +0100 Subject: [PATCH 1/5] feat(bl32): create an sp_min_setup function This new C function will call sp_min_early_platform_setup2() and sp_min_plat_arch_setup(). At this step the C environment is already enabled, and it allows adding function like the one for early console for which r9-r12 registers could be clobbered. Signed-off-by: Yann Gautier Change-Id: I4cbf2f6acea769d595ff40b2e2b4ca5d29672878 --- bl32/sp_min/aarch32/entrypoint.S | 5 ++--- bl32/sp_min/sp_min_main.c | 13 ++++++++++++- bl32/sp_min/sp_min_private.h | 6 +++++- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/bl32/sp_min/aarch32/entrypoint.S b/bl32/sp_min/aarch32/entrypoint.S index 693dd4b82..ba9d90d42 100644 --- a/bl32/sp_min/aarch32/entrypoint.S +++ b/bl32/sp_min/aarch32/entrypoint.S @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2023, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2016-2024, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -118,8 +118,7 @@ func sp_min_entrypoint mov r1, r10 mov r2, r11 mov r3, r12 - bl sp_min_early_platform_setup2 - bl sp_min_plat_arch_setup + bl sp_min_setup /* Jump to the main function */ bl sp_min_main diff --git a/bl32/sp_min/sp_min_main.c b/bl32/sp_min/sp_min_main.c index 26cf2079d..1c7e9600a 100644 --- a/bl32/sp_min/sp_min_main.c +++ b/bl32/sp_min/sp_min_main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2023, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2016-2024, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -169,6 +169,17 @@ uintptr_t get_arm_std_svc_args(unsigned int svc_mask) return (uintptr_t)&psci_args; } +/****************************************************************************** + * The SP_MIN setup function. Calls platforms init functions + *****************************************************************************/ +void sp_min_setup(u_register_t arg0, u_register_t arg1, u_register_t arg2, + u_register_t arg3) +{ + /* Perform early platform-specific setup */ + sp_min_early_platform_setup2(arg0, arg1, arg2, arg3); + sp_min_plat_arch_setup(); +} + /****************************************************************************** * The SP_MIN main function. Do the platform and PSCI Library setup. Also * initialize the runtime service framework. diff --git a/bl32/sp_min/sp_min_private.h b/bl32/sp_min/sp_min_private.h index 628581a4c..9c6b5fb29 100644 --- a/bl32/sp_min/sp_min_private.h +++ b/bl32/sp_min/sp_min_private.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2016-2024, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -7,6 +7,10 @@ #ifndef SP_MIN_PRIVATE_H #define SP_MIN_PRIVATE_H +#include + +void sp_min_setup(u_register_t arg0, u_register_t arg1, u_register_t arg2, + u_register_t arg3); void sp_min_main(void); void sp_min_warm_boot(void); void sp_min_fiq(void); From ae770fedf459d5643125d29f48659e3e936ebd2d Mon Sep 17 00:00:00 2001 From: Yann Gautier Date: Tue, 16 Jan 2024 19:39:31 +0100 Subject: [PATCH 2/5] 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 Change-Id: I77bf0a0c4289b4c7df94e4bfb783a938e05bf023 --- Makefile | 2 ++ bl1/bl1_main.c | 5 ++++- bl2/bl2_main.c | 8 +++++++- bl31/bl31_main.c | 5 ++++- bl32/sp_min/sp_min_main.c | 3 +++ bl32/tsp/tsp_common.c | 5 ++++- docs/getting_started/build-options.rst | 7 +++++++ docs/porting-guide.rst | 13 ++++++++++++- include/common/debug.h | 8 +++++++- include/plat/common/platform.h | 8 ++++++++ make_helpers/defaults.mk | 5 ++++- 11 files changed, 62 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 6b1f47cf3..a9be6a75b 100644 --- a/Makefile +++ b/Makefile @@ -1197,6 +1197,7 @@ $(eval $(call assert_booleans,\ ENABLE_CONSOLE_GETC \ INIT_UNUSED_NS_EL2 \ PLATFORM_REPORT_CTX_MEM_USE \ + EARLY_CONSOLE \ ))) # Numeric_Flags @@ -1394,6 +1395,7 @@ $(eval $(call add_defines,\ ENABLE_CONSOLE_GETC \ INIT_UNUSED_NS_EL2 \ PLATFORM_REPORT_CTX_MEM_USE \ + EARLY_CONSOLE \ ))) ifeq (${PLATFORM_REPORT_CTX_MEM_USE}, 1) diff --git a/bl1/bl1_main.c b/bl1/bl1_main.c index 6fe551188..657366b9e 100644 --- a/bl1/bl1_main.c +++ b/bl1/bl1_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 */ @@ -64,6 +64,9 @@ void bl1_calc_bl2_mem_layout(const meminfo_t *bl1_mem_layout, ******************************************************************************/ void bl1_setup(void) { + /* Enable early console if EARLY_CONSOLE flag is enabled */ + plat_setup_early_console(); + /* Perform early platform-specific setup */ bl1_early_platform_setup(); 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); diff --git a/bl31/bl31_main.c b/bl31/bl31_main.c index 98078171d..cfa07b1b6 100644 --- a/bl31/bl31_main.c +++ b/bl31/bl31_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 */ @@ -94,6 +94,9 @@ static void __init bl31_lib_init(void) void bl31_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 */ bl31_early_platform_setup2(arg0, arg1, arg2, arg3); diff --git a/bl32/sp_min/sp_min_main.c b/bl32/sp_min/sp_min_main.c index 1c7e9600a..39dfa71c4 100644 --- a/bl32/sp_min/sp_min_main.c +++ b/bl32/sp_min/sp_min_main.c @@ -175,6 +175,9 @@ uintptr_t get_arm_std_svc_args(unsigned int svc_mask) void sp_min_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 */ sp_min_early_platform_setup2(arg0, arg1, arg2, arg3); sp_min_plat_arch_setup(); diff --git a/bl32/tsp/tsp_common.c b/bl32/tsp/tsp_common.c index 908b4ff09..3a6c9d97f 100644 --- a/bl32/tsp/tsp_common.c +++ b/bl32/tsp/tsp_common.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2022-2024, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -66,6 +66,9 @@ smc_args_t *set_smc_args(uint64_t arg0, ******************************************************************************/ void tsp_setup(void) { + /* Enable early console if EARLY_CONSOLE flag is enabled */ + plat_setup_early_console(); + /* Perform early platform-specific setup. */ tsp_early_platform_setup(); diff --git a/docs/getting_started/build-options.rst b/docs/getting_started/build-options.rst index c18c1552c..2892dc6e6 100644 --- a/docs/getting_started/build-options.rst +++ b/docs/getting_started/build-options.rst @@ -230,6 +230,13 @@ Common build options contributions are still expected to build with ``W=0`` and ``E=1`` (the default). +- ``EARLY_CONSOLE``: This option is used to enable early traces before default + console is properly setup. It introduces EARLY_* traces macros, that will + use the non-EARLY traces macros if the flag is enabled, or do nothing + otherwise. To use this feature, platforms will have to create the function + plat_setup_early_console(). + Default is 0 (disabled) + - ``EL3_PAYLOAD_BASE``: This option enables booting an EL3 payload instead of the normal boot flow. It must specify the entry point address of the EL3 payload. Please refer to the "Booting an EL3 payload" section for more diff --git a/docs/porting-guide.rst b/docs/porting-guide.rst index 7c66d1118..59023c095 100644 --- a/docs/porting-guide.rst +++ b/docs/porting-guide.rst @@ -3274,6 +3274,17 @@ This API is used by the crash reporting mechanism to force write of all buffered data on the designated crash console. It should only use general purpose registers x0 through x5 to do its work. +Function : plat_setup_early_console [optional] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + Argument : void + Return : void + +This API is used to setup the early console, it is required only if the flag +``EARLY_CONSOLE`` is enabled. + .. _External Abort handling and RAS Support: External Abort handling and RAS Support @@ -3560,7 +3571,7 @@ to :ref:`Measured Boot Design` for more details. -------------- -*Copyright (c) 2013-2023, Arm Limited and Contributors. All rights reserved.* +*Copyright (c) 2013-2024, Arm Limited and Contributors. All rights reserved.* .. _PSCI: https://developer.arm.com/documentation/den0022/latest/ .. _Arm Generic Interrupt Controller version 2.0 (GICv2): http://infocenter.arm.com/help/topic/com.arm.doc.ihi0048b/index.html diff --git a/include/common/debug.h b/include/common/debug.h index 5ea541da0..0ddb40079 100644 --- a/include/common/debug.h +++ b/include/common/debug.h @@ -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 */ @@ -91,6 +91,12 @@ # define VERBOSE(...) no_tf_log(LOG_MARKER_VERBOSE __VA_ARGS__) #endif +#if EARLY_CONSOLE +#define EARLY_ERROR(...) ERROR(__VA_ARGS__) +#else /* !EARLY_CONSOLE */ +#define EARLY_ERROR(...) no_tf_log(LOG_MARKER_ERROR __VA_ARGS__) +#endif /* EARLY_CONSOLE */ + const char *get_el_str(unsigned int el); #if ENABLE_BACKTRACE diff --git a/include/plat/common/platform.h b/include/plat/common/platform.h index 4fe362005..d4db77862 100644 --- a/include/plat/common/platform.h +++ b/include/plat/common/platform.h @@ -184,6 +184,14 @@ static inline int plat_mboot_measure_key(const void *pk_oid __unused, } #endif /* MEASURED_BOOT */ +#if EARLY_CONSOLE +void plat_setup_early_console(void); +#else +static inline void plat_setup_early_console(void) +{ +} +#endif /* EARLY_CONSOLE */ + /******************************************************************************* * Mandatory BL1 functions ******************************************************************************/ diff --git a/make_helpers/defaults.mk b/make_helpers/defaults.mk index 26d2a00cd..b9ea81081 100644 --- a/make_helpers/defaults.mk +++ b/make_helpers/defaults.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016-2023, Arm Limited. All rights reserved. +# Copyright (c) 2016-2024, Arm Limited. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # @@ -392,3 +392,6 @@ CTX_INCLUDE_MPAM_REGS := 0 # Enable context memory usage reporting during BL31 setup. PLATFORM_REPORT_CTX_MEM_USE := 0 + +# Enable early console +EARLY_CONSOLE := 0 From 94cad75a35158f435ecd04bf93ff9d18a3cd34bd Mon Sep 17 00:00:00 2001 From: Yann Gautier Date: Wed, 25 Oct 2023 18:41:16 +0200 Subject: [PATCH 3/5] refactor(st): replace STM32MP_EARLY_CONSOLE with EARLY_CONSOLE Now that EARLY_CONSOLE is generic, use it instead of the ST flag. Remove stm32mp_setup_early_console() calls as it is done in common TF-A code. Signed-off-by: Yann Gautier Change-Id: Icac29b62a6267303cb5c679d15847c013ead1d23 --- docs/plat/st/stm32mpus.rst | 2 -- plat/st/common/common.mk | 3 --- plat/st/common/include/stm32mp_common.h | 8 -------- plat/st/common/stm32mp_common.c | 6 +++--- plat/st/stm32mp1/bl2_plat_setup.c | 2 -- plat/st/stm32mp1/sp_min/sp_min_setup.c | 2 -- plat/st/stm32mp2/bl2_plat_setup.c | 1 - 7 files changed, 3 insertions(+), 21 deletions(-) diff --git a/docs/plat/st/stm32mpus.rst b/docs/plat/st/stm32mpus.rst index ab6d8fe51..7b4711278 100644 --- a/docs/plat/st/stm32mpus.rst +++ b/docs/plat/st/stm32mpus.rst @@ -54,8 +54,6 @@ Other configuration flags: | Default: stm32mp157c-ev1.dtb - | ``DWL_BUFFER_BASE``: the 'serial boot' load address of FIP, | default location (end of the first 128MB) is used when absent -- | ``STM32MP_EARLY_CONSOLE``: to enable early traces before clock driver is setup. - | Default: 0 (disabled) - | ``STM32MP_RECONFIGURE_CONSOLE``: to re-configure crash console (especially after BL2). | Default: 0 (disabled) - | ``STM32MP_UART_BAUDRATE``: to select UART baud rate. diff --git a/plat/st/common/common.mk b/plat/st/common/common.mk index b9b62c03f..7ef76652e 100644 --- a/plat/st/common/common.mk +++ b/plat/st/common/common.mk @@ -6,7 +6,6 @@ RESET_TO_BL2 := 1 -STM32MP_EARLY_CONSOLE ?= 0 STM32MP_RECONFIGURE_CONSOLE ?= 0 STM32MP_UART_BAUDRATE ?= 115200 @@ -82,7 +81,6 @@ endif $(eval $(call assert_booleans,\ $(sort \ PLAT_XLAT_TABLES_DYNAMIC \ - STM32MP_EARLY_CONSOLE \ STM32MP_EMMC \ STM32MP_EMMC_BOOT \ STM32MP_RAW_NAND \ @@ -104,7 +102,6 @@ $(eval $(call add_defines,\ $(sort \ PLAT_XLAT_TABLES_DYNAMIC \ STM32_TF_VERSION \ - STM32MP_EARLY_CONSOLE \ STM32MP_EMMC \ STM32MP_EMMC_BOOT \ STM32MP_RAW_NAND \ diff --git a/plat/st/common/include/stm32mp_common.h b/plat/st/common/include/stm32mp_common.h index a1ed1addd..41b86ae0a 100644 --- a/plat/st/common/include/stm32mp_common.h +++ b/plat/st/common/include/stm32mp_common.h @@ -77,14 +77,6 @@ uintptr_t get_uart_address(uint32_t instance_nb); /* Setup the UART console */ int stm32mp_uart_console_setup(void); -#if STM32MP_EARLY_CONSOLE -void stm32mp_setup_early_console(void); -#else -static inline void stm32mp_setup_early_console(void) -{ -} -#endif - /* * Platform util functions for the GPIO driver * @bank: Target GPIO bank ID as per DT bindings diff --git a/plat/st/common/stm32mp_common.c b/plat/st/common/stm32mp_common.c index a1d1c4963..6f36011f9 100644 --- a/plat/st/common/stm32mp_common.c +++ b/plat/st/common/stm32mp_common.c @@ -269,8 +269,8 @@ int stm32mp_uart_console_setup(void) return 0; } -#if STM32MP_EARLY_CONSOLE -void stm32mp_setup_early_console(void) +#if EARLY_CONSOLE +void plat_setup_early_console(void) { #if defined(IMAGE_BL2) || STM32MP_RECONFIGURE_CONSOLE plat_crash_console_init(); @@ -278,7 +278,7 @@ void stm32mp_setup_early_console(void) set_console(STM32MP_DEBUG_USART_BASE, STM32MP_DEBUG_USART_CLK_FRQ); NOTICE("Early console setup\n"); } -#endif /* STM32MP_EARLY_CONSOLE */ +#endif /* EARLY_CONSOLE */ /***************************************************************************** * plat_is_smccc_feature_available() - This function checks whether SMCCC diff --git a/plat/st/stm32mp1/bl2_plat_setup.c b/plat/st/stm32mp1/bl2_plat_setup.c index 798c033c7..bd3903d3e 100644 --- a/plat/st/stm32mp1/bl2_plat_setup.c +++ b/plat/st/stm32mp1/bl2_plat_setup.c @@ -142,8 +142,6 @@ void bl2_el3_early_platform_setup(u_register_t arg0, u_register_t arg2 __unused, u_register_t arg3 __unused) { - stm32mp_setup_early_console(); - stm32mp_save_boot_ctx_address(arg0); } diff --git a/plat/st/stm32mp1/sp_min/sp_min_setup.c b/plat/st/stm32mp1/sp_min/sp_min_setup.c index 245b2d324..7bfe6ba56 100644 --- a/plat/st/stm32mp1/sp_min/sp_min_setup.c +++ b/plat/st/stm32mp1/sp_min/sp_min_setup.c @@ -116,8 +116,6 @@ void sp_min_early_platform_setup2(u_register_t arg0, u_register_t arg1, bl_params_t *params_from_bl2 = (bl_params_t *)arg0; uintptr_t dt_addr = arg1; - stm32mp_setup_early_console(); - /* Imprecise aborts can be masked in NonSecure */ write_scr(read_scr() | SCR_AW_BIT); diff --git a/plat/st/stm32mp2/bl2_plat_setup.c b/plat/st/stm32mp2/bl2_plat_setup.c index a7cce627c..a09598b38 100644 --- a/plat/st/stm32mp2/bl2_plat_setup.c +++ b/plat/st/stm32mp2/bl2_plat_setup.c @@ -18,7 +18,6 @@ void bl2_el3_early_platform_setup(u_register_t arg0 __unused, u_register_t arg2 __unused, u_register_t arg3 __unused) { - stm32mp_setup_early_console(); } void bl2_platform_setup(void) From cf237f8d55255da1aad4f8dccb3110bab6060eba Mon Sep 17 00:00:00 2001 From: Yann Gautier Date: Thu, 2 Nov 2023 15:36:12 +0100 Subject: [PATCH 4/5] feat(st-bsec): use early traces Replace trace macros with their corresponding EARLY_* macros. Add some early traces in bsec2 driver. Change-Id: I65e2feee6e7ba2524fb0a334557aa6e883672765 Signed-off-by: Yann Gautier --- drivers/st/bsec/bsec2.c | 16 +++++++++++++--- drivers/st/bsec/bsec3.c | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/st/bsec/bsec2.c b/drivers/st/bsec/bsec2.c index a6e522094..db07d1c5c 100644 --- a/drivers/st/bsec/bsec2.c +++ b/drivers/st/bsec/bsec2.c @@ -166,11 +166,13 @@ static void bsec_late_init(void) struct dt_node_info bsec_info; if (fdt_get_address(&fdt) == 0) { + EARLY_ERROR("%s: DT not found\n", __func__); panic(); } node = bsec_get_dt_node(&bsec_info); if (node < 0) { + EARLY_ERROR("%s: BSEC node not found\n", __func__); panic(); } @@ -226,13 +228,21 @@ static uint32_t bsec_check_error(uint32_t otp, bool check_disturbed) */ uint32_t bsec_probe(void) { + uint32_t version; + uint32_t id; + if (is_otp_invalid_mode()) { + EARLY_ERROR("%s: otp_invalid_mod\n", __func__); return BSEC_ERROR; } - if (((bsec_get_version() != BSEC_IP_VERSION_1_1) && - (bsec_get_version() != BSEC_IP_VERSION_2_0)) || - (bsec_get_id() != BSEC_IP_ID_2)) { + version = bsec_get_version(); + id = bsec_get_id(); + + if (((version != BSEC_IP_VERSION_1_1) && + (version != BSEC_IP_VERSION_2_0)) || + (id != BSEC_IP_ID_2)) { + EARLY_ERROR("%s: version = 0x%x, id = 0x%x\n", __func__, version, id); panic(); } diff --git a/drivers/st/bsec/bsec3.c b/drivers/st/bsec/bsec3.c index a803a3a9c..3fdaf16fb 100644 --- a/drivers/st/bsec/bsec3.c +++ b/drivers/st/bsec/bsec3.c @@ -188,7 +188,7 @@ uint32_t bsec_probe(void) uint32_t id = bsec_get_id(); if ((version != BSEC_IP_VERSION_1_0) || (id != BSEC_IP_ID_3)) { - ERROR("%s: version = 0x%x, id = 0x%x\n", __func__, version, id); + EARLY_ERROR("%s: version = 0x%x, id = 0x%x\n", __func__, version, id); panic(); } From 47ea303389f6d0ac81617366973ece9d93dc49c9 Mon Sep 17 00:00:00 2001 From: Yann Gautier Date: Thu, 18 Jan 2024 11:39:19 +0100 Subject: [PATCH 5/5] feat(stm32mp2): use early traces Replace ERROR message with EARLY_ERROR for OTP driver probe, as this will be called before default console is enabled. Signed-off-by: Yann Gautier Change-Id: I756a04727c494d5f681a45d47d01189dff07dbe7 --- plat/st/stm32mp2/bl2_plat_setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plat/st/stm32mp2/bl2_plat_setup.c b/plat/st/stm32mp2/bl2_plat_setup.c index a09598b38..724209a16 100644 --- a/plat/st/stm32mp2/bl2_plat_setup.c +++ b/plat/st/stm32mp2/bl2_plat_setup.c @@ -27,7 +27,7 @@ void bl2_platform_setup(void) void bl2_el3_plat_arch_setup(void) { if (stm32_otp_probe() != 0U) { - ERROR("OTP probe failed\n"); + EARLY_ERROR("OTP probe failed\n"); panic(); } }