mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-15 09:04:17 +00:00

BL2_AT_EL3 is an overloaded macro which has two uses: 1. When BL2 is entry point into TF-A(no BL1) 2. When BL2 is running at EL3 exception level These two scenarios are not exactly same even though first implicitly means second to be true. To distinguish between these two use cases we introduce new macros. BL2_AT_EL3 is renamed to RESET_TO_BL2 to better convey both 1. and 2. Additional macro BL2_RUNS_AT_EL3 is added to cover all scenarious where BL2 runs at EL3 (including four world systems). BREAKING CHANGE: BL2_AT_EL3 renamed to RESET_TO_BL2 across the repository. Change-Id: I477e1d0f843b44b799c216670e028fcb3509fb72 Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Signed-off-by: Maksims Svecovs <maksims.svecovs@arm.com>
54 lines
1.2 KiB
C
54 lines
1.2 KiB
C
/*
|
|
* Copyright (c) 2020-2023, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#include <assert.h>
|
|
|
|
#include <platform_def.h>
|
|
|
|
#include <common/debug.h>
|
|
#include <drivers/arm/pl011.h>
|
|
#include <drivers/console.h>
|
|
#include <fconf_hw_config_getter.h>
|
|
#include <plat/arm/common/plat_arm.h>
|
|
|
|
static console_t fvp_runtime_console;
|
|
|
|
/* Initialize the runtime console */
|
|
void arm_console_runtime_init(void)
|
|
{
|
|
uintptr_t uart_base;
|
|
uint32_t uart_clk;
|
|
|
|
/*
|
|
* fconf APIs are not supported for RESET_TO_SP_MIN, RESET_TO_BL31 and
|
|
* RESET_TO_BL2 systems.
|
|
*/
|
|
#if RESET_TO_SP_MIN || RESET_TO_BL31 || RESET_TO_BL2
|
|
uart_base = PLAT_ARM_RUN_UART_BASE;
|
|
uart_clk = PLAT_ARM_RUN_UART_CLK_IN_HZ;
|
|
#else
|
|
uart_base = FCONF_GET_PROPERTY(hw_config, uart_serial_config,
|
|
uart_base);
|
|
uart_clk = FCONF_GET_PROPERTY(hw_config, uart_serial_config,
|
|
uart_clk);
|
|
#endif
|
|
|
|
int rc = console_pl011_register(uart_base, uart_clk,
|
|
ARM_CONSOLE_BAUDRATE,
|
|
&fvp_runtime_console);
|
|
|
|
if (rc == 0) {
|
|
panic();
|
|
}
|
|
|
|
console_set_scope(&fvp_runtime_console, CONSOLE_FLAG_RUNTIME);
|
|
}
|
|
|
|
void arm_console_runtime_end(void)
|
|
{
|
|
console_flush();
|
|
(void)console_unregister(&fvp_runtime_console);
|
|
}
|