aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2018-07-03 19:20:57 +1000
committerStewart Smith <stewart@linux.ibm.com>2018-07-04 18:40:54 -0500
commite21159bf9683a3d61478c4929f6706aa0efa35af (patch)
tree3dc452deec1325389d03ee03efc235d6c502af6a
parent7a3f307ed0db8552a086dd0e4a45fe08e1807084 (diff)
downloadskiboot-e21159bf9683a3d61478c4929f6706aa0efa35af.zip
skiboot-e21159bf9683a3d61478c4929f6706aa0efa35af.tar.gz
skiboot-e21159bf9683a3d61478c4929f6706aa0efa35af.tar.bz2
core: always flush console before stopping
This catches a few cases (e.g., fast reboot failure messages) that don't always make it to the console before the machine is rebooted. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
-rw-r--r--core/fast-reboot.c3
-rw-r--r--core/platform.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/core/fast-reboot.c b/core/fast-reboot.c
index 8234799..5681975 100644
--- a/core/fast-reboot.c
+++ b/core/fast-reboot.c
@@ -16,6 +16,7 @@
#include <skiboot.h>
#include <cpu.h>
+#include <console.h>
#include <fsp.h>
#include <psi.h>
#include <opal.h>
@@ -175,6 +176,8 @@ void fast_reboot(void)
/* This resets our quiesce state ready to enter the new kernel. */
opal_quiesce(QUIESCE_RESUME_FAST_REBOOT, -1);
+ console_complete_flush();
+
asm volatile("ba 0x100\n\t" : : : "memory");
for (;;)
;
diff --git a/core/platform.c b/core/platform.c
index 3282227..b32cbf5 100644
--- a/core/platform.c
+++ b/core/platform.c
@@ -58,12 +58,12 @@ static int64_t opal_cec_reboot(void)
opal_quiesce(QUIESCE_HOLD, -1);
- console_complete_flush();
-
/* Try fast-reset unless explicitly disabled */
if (!nvram_query_eq("fast-reset","0"))
fast_reboot();
+ console_complete_flush();
+
if (platform.cec_reboot)
return platform.cec_reboot();
@@ -97,6 +97,7 @@ static int64_t opal_cec_reboot2(uint32_t reboot_type, char *diag)
prerror("OPAL: failed to log an error\n");
}
disable_fast_reboot("Reboot due to Platform Error");
+ console_complete_flush();
return xscom_trigger_xstop();
case OPAL_REBOOT_FULL_IPL:
disable_fast_reboot("full IPL reboot requested");