fix(bl31): resolve runtime console garbage in next stage
When BL31 software is sending data through a communication channel,
there's a chance that the final portion of the data could become
disrupted, if another software (BL32/RMM) starts setting up the
channel at the same time. To solve this issue, make sure to flush the
console data from BL31, before initializing BL32/RMM. This makes sure
that the communication stays reliable.
Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Change-Id: Icb8003e068b0b93bc4672e05f69001d9694a175c
diff --git a/bl31/bl31_main.c b/bl31/bl31_main.c
index 8f1f043..bf805f5 100644
--- a/bl31/bl31_main.c
+++ b/bl31/bl31_main.c
@@ -163,6 +163,7 @@
if (bl32_init != NULL) {
INFO("BL31: Initializing BL32\n");
+ console_flush();
int32_t rc = (*bl32_init)();
if (rc == 0) {
@@ -178,6 +179,7 @@
if (rmm_init != NULL) {
INFO("BL31: Initializing RMM\n");
+ console_flush();
int32_t rc = (*rmm_init)();
if (rc == 0) {