refactor(xilinx): console runtime switch on bl31 exit

Flush the FIFO before switching to runtime. This is so that there are
no lingering chars in the FIFO when we move to the runtime console.

TF-A plans to refactor the console_Switch_state(CONSOLE_FLAG_RUNTIME)
and console_flush() calls and make them the last calls in bl31_main()
(before BL31 exits). Until then they are being left as the last calls
in bl31_plat_runtime_setup() for testing before refactoring.

This patch affects Xilinx SoCs only.

Change-Id: Iea4cf920934bbde4312f40c8c7b3e0f56a316e86
Signed-off-by: Salman Nabi <salman.nabi@arm.com>
This commit is contained in:
Salman Nabi 2024-02-19 16:50:05 +00:00
parent 9edf08b177
commit 48932c3c27
3 changed files with 6 additions and 3 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2021, Arm Limited and Contributors. All rights reserved.
* Copyright (c) 2018-2024, Arm Limited and Contributors. All rights reserved.
* Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
* Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
*
@ -207,6 +207,7 @@ void bl31_plat_runtime_setup(void)
panic();
}
console_flush();
console_switch_state(CONSOLE_FLAG_RUNTIME);
}

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2020, Arm Limited and Contributors. All rights reserved.
* Copyright (c) 2018-2024, Arm Limited and Contributors. All rights reserved.
* Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
* Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
*
@ -232,6 +232,7 @@ void bl31_plat_runtime_setup(void)
panic();
}
console_flush();
console_switch_state(CONSOLE_FLAG_RUNTIME);
}

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2021, Arm Limited and Contributors. All rights reserved.
* Copyright (c) 2013-2024, Arm Limited and Contributors. All rights reserved.
* Copyright (c) 2023, Advanced Micro Devices, Inc. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
@ -191,6 +191,7 @@ void bl31_plat_runtime_setup(void)
custom_runtime_setup();
console_flush();
console_switch_state(CONSOLE_FLAG_RUNTIME);
}