diff options
author | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2017-02-16 16:17:19 +0000 |
---|---|---|
committer | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2017-03-31 09:54:22 +0100 |
commit | 0b32628eddfef95b51909816f625e6f37cd21cb8 (patch) | |
tree | 7b543f2e311a9661dd8d4e4df927bc4386f79f0b | |
parent | 801cf93c48585a83fda5d576b25c7b7f3cd59259 (diff) | |
download | arm-trusted-firmware-0b32628eddfef95b51909816f625e6f37cd21cb8.tar.gz |
Flush console where necessary
Call console_flush() before execution either terminates or leaves an
exception level.
Fixes: ARM-software/tf-issues#123
Change-Id: I64eeb92effb039f76937ce89f877b68e355588e3
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
-rw-r--r-- | bl1/bl1_main.c | 3 | ||||
-rw-r--r-- | bl2/bl2_main.c | 5 | ||||
-rw-r--r-- | bl2u/bl2u_main.c | 5 | ||||
-rw-r--r-- | bl31/bl31_main.c | 5 | ||||
-rw-r--r-- | lib/psci/psci_system_off.c | 7 | ||||
-rw-r--r-- | lib/stdlib/assert.c | 7 |
6 files changed, 27 insertions, 5 deletions
diff --git a/bl1/bl1_main.c b/bl1/bl1_main.c index 90c06afef..89664cd0f 100644 --- a/bl1/bl1_main.c +++ b/bl1/bl1_main.c @@ -34,6 +34,7 @@ #include <auth_mod.h> #include <bl1.h> #include <bl_common.h> +#include <console.h> #include <debug.h> #include <errata_report.h> #include <platform.h> @@ -166,6 +167,8 @@ void bl1_main(void) NOTICE("BL1-FWU: *******FWU Process Started*******\n"); bl1_prepare_next_image(image_id); + + console_flush(); } /******************************************************************************* diff --git a/bl2/bl2_main.c b/bl2/bl2_main.c index 514c00533..d187f2e34 100644 --- a/bl2/bl2_main.c +++ b/bl2/bl2_main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2016, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -32,6 +32,7 @@ #include <auth_mod.h> #include <bl1.h> #include <bl_common.h> +#include <console.h> #include <debug.h> #include <platform.h> #include "bl2_private.h" @@ -69,6 +70,8 @@ void bl2_main(void) disable_mmu_icache_secure(); #endif /* AARCH32 */ + console_flush(); + /* * Run next BL image via an SMC to BL1. Information on how to pass * control to the BL32 (if present) and BL33 software images will diff --git a/bl2u/bl2u_main.c b/bl2u/bl2u_main.c index 515ddfb73..3ed5be73d 100644 --- a/bl2u/bl2u_main.c +++ b/bl2u/bl2u_main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -34,6 +34,7 @@ #include <auth_mod.h> #include <bl_common.h> #include <bl1.h> +#include <console.h> #include <debug.h> #include <platform.h> #include <platform_def.h> @@ -63,6 +64,8 @@ void bl2u_main(void) /* Perform platform setup in BL2U after loading SCP_BL2U */ bl2u_platform_setup(); + console_flush(); + /* * Indicate that BL2U is done and resume back to * normal world via an SMC to BL1. diff --git a/bl31/bl31_main.c b/bl31/bl31_main.c index 85b3ea1e5..c74b72b71 100644 --- a/bl31/bl31_main.c +++ b/bl31/bl31_main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2016, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -33,6 +33,7 @@ #include <assert.h> #include <bl_common.h> #include <bl31.h> +#include <console.h> #include <context_mgmt.h> #include <debug.h> #include <platform.h> @@ -129,6 +130,8 @@ void bl31_main(void) */ bl31_prepare_next_image_entry(); + console_flush(); + /* * Perform any platform specific runtime setup prior to cold boot exit * from BL31 diff --git a/lib/psci/psci_system_off.c b/lib/psci/psci_system_off.c index de9ec6436..eb3e7fbc0 100644 --- a/lib/psci/psci_system_off.c +++ b/lib/psci/psci_system_off.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2016, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2014-2017, ARM Limited and Contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -31,6 +31,7 @@ #include <stddef.h> #include <arch_helpers.h> #include <assert.h> +#include <console.h> #include <debug.h> #include <platform.h> #include "psci_private.h" @@ -46,6 +47,8 @@ void psci_system_off(void) psci_spd_pm->svc_system_off(); } + console_flush(); + /* Call the platform specific hook */ psci_plat_pm_ops->system_off(); @@ -63,6 +66,8 @@ void psci_system_reset(void) psci_spd_pm->svc_system_reset(); } + console_flush(); + /* Call the platform specific hook */ psci_plat_pm_ops->system_reset(); diff --git a/lib/stdlib/assert.c b/lib/stdlib/assert.c index 90a1afe50..cb3f3550e 100644 --- a/lib/stdlib/assert.c +++ b/lib/stdlib/assert.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2014, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -28,7 +28,9 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include <console.h> #include <debug.h> +#include <platform.h> /* * This is a basic implementation. This could be improved. @@ -37,5 +39,8 @@ void __assert (const char *function, const char *file, unsigned int line, const char *assertion) { tf_printf("ASSERT: %s <%d> : %s\n", function, line, assertion); + + console_flush(); + while(1); } |