From 78e61613738e53738e1cc8ddefd4cef2f2443f4c Mon Sep 17 00:00:00 2001 From: Soby Mathew Date: Wed, 9 Dec 2015 11:28:43 +0000 Subject: Ensure BL31 does not print to boot console by default It is not ideal for BL31 to continue to use boot console at runtime which could be potentially uninitialized. This patch introduces a new optional platform porting API `bl31_plat_runtime_setup()` which allows the platform to perform any BL31 runtime setup just prior to BL31 exit during cold boot. The default weak implementation of this function will invoke `console_uninit()` which will suppress any BL31 runtime logs. On the ARM Standard platforms, there is an anomaly that the boot console will be reinitialized on resumption from system suspend in `arm_system_pwr_domain_resume()`. This will be resolved in the following patch. NOTE: The default weak definition of `bl31_plat_runtime_setup()` disables the BL31 console. To print the BL31 runtime messages, platforms must override this API and initialize a runtime console. Fixes ARM-software/tf-issues#328 Change-Id: Ibaf8346fcceb447fe1a5674094c9f8eb4c09ac4a --- bl31/bl31_main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'bl31/bl31_main.c') diff --git a/bl31/bl31_main.c b/bl31/bl31_main.c index 9abc395b..f22e6121 100644 --- a/bl31/bl31_main.c +++ b/bl31/bl31_main.c @@ -77,7 +77,7 @@ void bl31_main(void) /* Perform remaining generic architectural setup from EL3 */ bl31_arch_setup(); - /* Perform platform setup in BL1 */ + /* Perform platform setup in BL31 */ bl31_platform_setup(); /* Initialise helper libraries */ @@ -109,6 +109,12 @@ void bl31_main(void) * corresponding to the desired security state after the next ERET. */ bl31_prepare_next_image_entry(); + + /* + * Perform any platform specific runtime setup prior to cold boot exit + * from BL31 + */ + bl31_plat_runtime_setup(); } /******************************************************************************* -- cgit v1.2.3