From 0c55c10305df6217fd978d58ce203dbad3edd4d5 Mon Sep 17 00:00:00 2001 From: Juan Pablo Conde Date: Tue, 1 Feb 2022 15:19:58 -0500 Subject: [PATCH] fix(fvp): FCONF Trace Not Shown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updating call order for arm_console_boot_init() and arm_bl31_early_platform_setup(). Signed-off-by:  Juan Pablo Conde Change-Id: If932fff2ee4282a0aacf8751fa81e7665b886467 --- plat/arm/board/fvp/fvp_bl31_setup.c | 5 ++++- plat/arm/common/arm_console.c | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/plat/arm/board/fvp/fvp_bl31_setup.c b/plat/arm/board/fvp/fvp_bl31_setup.c index f9ee4492f..a94a4f4b7 100644 --- a/plat/arm/board/fvp/fvp_bl31_setup.c +++ b/plat/arm/board/fvp/fvp_bl31_setup.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2020, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2013-2022, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -20,6 +20,9 @@ void __init bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, u_register_t arg2, u_register_t arg3) { + /* Initialize the console to provide early debug support */ + arm_console_boot_init(); + #if !RESET_TO_BL31 && !BL2_AT_EL3 const struct dyn_cfg_dtb_info_t *soc_fw_config_info; diff --git a/plat/arm/common/arm_console.c b/plat/arm/common/arm_console.c index af5f11e46..51830c9c1 100644 --- a/plat/arm/common/arm_console.c +++ b/plat/arm/common/arm_console.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2018-2022, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -25,6 +25,11 @@ static console_t arm_runtime_console; /* Initialize the console to provide early debug support */ void __init arm_console_boot_init(void) { + /* If the console was initialized already, don't initialize again */ + if (arm_boot_console.base == PLAT_ARM_BOOT_UART_BASE) { + return; + } + int rc = console_pl011_register(PLAT_ARM_BOOT_UART_BASE, PLAT_ARM_BOOT_UART_CLK_IN_HZ, ARM_CONSOLE_BAUDRATE,