summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>2017-02-16 16:17:19 +0000
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>2017-03-31 09:54:22 +0100
commit0b32628eddfef95b51909816f625e6f37cd21cb8 (patch)
tree7b543f2e311a9661dd8d4e4df927bc4386f79f0b /lib
parent801cf93c48585a83fda5d576b25c7b7f3cd59259 (diff)
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/psci/psci_system_off.c7
-rw-r--r--lib/stdlib/assert.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/psci/psci_system_off.c b/lib/psci/psci_system_off.c
index de9ec643..eb3e7fbc 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 90a1afe5..cb3f3550 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);
}