mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-07 21:33:54 +00:00
refactor(console): consolidate console runtime switch
Refactor console_flush() and console_switch_state(CONSOLE_FLAG_RUNTIME) to bl31_main(). This has been done per the recommendation in TF-A mailing list. These calls need to be the last calls, after any runtime initialization has been done, before BL31 exits. All platforms that override the generic implementation of bl31_plat_runtime_setup() have been refactored. The console_flush() and console_switch_state() calls have been removed as they become part of bl31_main() function. Any platform that don't need to make any change to the generic (weak) implementation of bl31_plat_runtime_setup() don't need to override it in their platforms. Change-Id: I6d04d6daa9353daeaa7e3df9e9adf6f322a917b8 Signed-off-by: Salman Nabi <salman.nabi@arm.com>
This commit is contained in:
parent
92752355f5
commit
af3e8e63b4
18 changed files with 4 additions and 68 deletions
|
@ -212,8 +212,6 @@ void bl31_main(void)
|
|||
*/
|
||||
bl31_prepare_next_image_entry();
|
||||
|
||||
console_flush();
|
||||
|
||||
/*
|
||||
* Perform any platform specific runtime setup prior to cold boot exit
|
||||
* from BL31
|
||||
|
@ -221,9 +219,12 @@ void bl31_main(void)
|
|||
bl31_plat_runtime_setup();
|
||||
|
||||
#if ENABLE_RUNTIME_INSTRUMENTATION
|
||||
PMF_CAPTURE_TIMESTAMP(bl_svc, BL31_EXIT, PMF_CACHE_MAINT);
|
||||
console_flush();
|
||||
PMF_CAPTURE_TIMESTAMP(bl_svc, BL31_EXIT, PMF_CACHE_MAINT);
|
||||
#endif
|
||||
|
||||
console_flush();
|
||||
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
|
@ -186,9 +186,6 @@ void bl31_plat_runtime_setup(void)
|
|||
{
|
||||
/* Change the DTB if the configuration requires so. */
|
||||
sunxi_prepare_dtb(fdt);
|
||||
|
||||
console_flush();
|
||||
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
||||
}
|
||||
|
||||
entry_point_info_t *bl31_plat_get_next_image_ep_info(uint32_t type)
|
||||
|
|
|
@ -237,9 +237,6 @@ void brcm_bl31_plat_runtime_setup(void)
|
|||
{
|
||||
/* Initialize the runtime console */
|
||||
bcm_console_runtime_init();
|
||||
|
||||
console_flush();
|
||||
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
||||
}
|
||||
|
||||
void bl31_platform_setup(void)
|
||||
|
|
|
@ -35,8 +35,6 @@
|
|||
|
||||
void bl31_plat_runtime_setup(void)
|
||||
{
|
||||
console_flush();
|
||||
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -149,9 +149,3 @@ void bl31_platform_setup(void)
|
|||
hisi_ipc_init();
|
||||
hisi_pwrc_setup();
|
||||
}
|
||||
|
||||
void bl31_plat_runtime_setup(void)
|
||||
{
|
||||
console_flush();
|
||||
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
||||
}
|
||||
|
|
|
@ -270,7 +270,4 @@ void bl31_plat_runtime_setup(void)
|
|||
if (rc != 0)
|
||||
panic();
|
||||
#endif
|
||||
|
||||
console_flush();
|
||||
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
||||
}
|
||||
|
|
|
@ -118,12 +118,6 @@ void bl31_platform_setup(void)
|
|||
hisi_tzpc_sec_init();
|
||||
}
|
||||
|
||||
void bl31_plat_runtime_setup(void)
|
||||
{
|
||||
console_flush();
|
||||
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
||||
}
|
||||
|
||||
void bl31_plat_arch_setup(void)
|
||||
{
|
||||
plat_configure_mmu_el3(BL31_BASE,
|
||||
|
|
|
@ -408,9 +408,3 @@ unsigned int plat_get_syscnt_freq2(void)
|
|||
{
|
||||
return COUNTER_FREQUENCY;
|
||||
}
|
||||
|
||||
void bl31_plat_runtime_setup(void)
|
||||
{
|
||||
console_flush();
|
||||
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
||||
}
|
||||
|
|
|
@ -386,9 +386,3 @@ unsigned int plat_get_syscnt_freq2(void)
|
|||
{
|
||||
return COUNTER_FREQUENCY;
|
||||
}
|
||||
|
||||
void bl31_plat_runtime_setup(void)
|
||||
{
|
||||
console_flush();
|
||||
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
||||
}
|
||||
|
|
|
@ -136,12 +136,6 @@ void bl31_platform_setup(void)
|
|||
plat_gic_init();
|
||||
}
|
||||
|
||||
void bl31_plat_runtime_setup(void)
|
||||
{
|
||||
console_flush();
|
||||
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
||||
}
|
||||
|
||||
entry_point_info_t *bl31_plat_get_next_image_ep_info(unsigned int type)
|
||||
{
|
||||
if (type == NON_SECURE) {
|
||||
|
|
|
@ -183,9 +183,6 @@ void marvell_bl31_plat_runtime_setup(void)
|
|||
{
|
||||
/* Initialize the runtime console */
|
||||
marvell_console_runtime_init();
|
||||
|
||||
console_flush();
|
||||
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
||||
}
|
||||
|
||||
void bl31_platform_setup(void)
|
||||
|
|
|
@ -166,9 +166,6 @@ void bl31_platform_setup(void)
|
|||
void bl31_plat_runtime_setup(void)
|
||||
{
|
||||
mtk_init_one_level(MTK_INIT_LVL_PLAT_RUNTIME);
|
||||
|
||||
console_flush();
|
||||
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
||||
}
|
||||
|
||||
unsigned int plat_get_syscnt_freq2(void)
|
||||
|
|
|
@ -258,9 +258,6 @@ void bl31_plat_runtime_setup(void)
|
|||
*/
|
||||
boot_profiler_add_record("[TF] bl31 exit");
|
||||
boot_profiler_deinit();
|
||||
|
||||
console_flush();
|
||||
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
|
@ -186,9 +186,6 @@ void bl31_plat_runtime_setup(void)
|
|||
ls_el3_interrupt_config();
|
||||
#endif
|
||||
soc_runtime_setup();
|
||||
|
||||
console_flush();
|
||||
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
|
@ -209,9 +209,6 @@ void bl31_plat_runtime_setup(void)
|
|||
struct draminfo *di = (struct draminfo *)(unsigned long)DRAMINFO_BASE;
|
||||
|
||||
sq_scp_get_draminfo(di);
|
||||
|
||||
console_flush();
|
||||
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
||||
}
|
||||
|
||||
void bl31_plat_arch_setup(void)
|
||||
|
|
|
@ -206,9 +206,6 @@ void bl31_plat_runtime_setup(void)
|
|||
if (rc != 0) {
|
||||
panic();
|
||||
}
|
||||
|
||||
console_flush();
|
||||
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -231,9 +231,6 @@ void bl31_plat_runtime_setup(void)
|
|||
if (rc != 0) {
|
||||
panic();
|
||||
}
|
||||
|
||||
console_flush();
|
||||
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -190,9 +190,6 @@ void bl31_plat_runtime_setup(void)
|
|||
#endif
|
||||
|
||||
custom_runtime_setup();
|
||||
|
||||
console_flush();
|
||||
console_switch_state(CONSOLE_FLAG_RUNTIME);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue