[Skiboot] [PATCH 08/17] Move FSP specific op-panel calls to platform.exit()

Stewart Smith stewart at linux.ibm.com
Tue Jun 18 17:29:16 AEST 2019


We move the platform exit call much closer to executing the kernel,
which should all be safe, and in fact a much better time to do watchdog
related things.

Signed-off-by: Stewart Smith <stewart at linux.ibm.com>
---
 core/init.c                | 13 +++----------
 platforms/ibm-fsp/common.c |  4 ++++
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/core/init.c b/core/init.c
index 55b562059247..c2b7b70a69f4 100644
--- a/core/init.c
+++ b/core/init.c
@@ -534,9 +534,6 @@ void __noreturn load_and_boot_kernel(bool is_reboot)
 
 	op_display(OP_LOG, OP_MOD_INIT, 0x000A);
 
-	if (platform.exit)
-		platform.exit();
-
 	/* Load kernel LID */
 	if (!load_kernel()) {
 		op_display(OP_FATAL, OP_MOD_INIT, 1);
@@ -590,13 +587,6 @@ void __noreturn load_and_boot_kernel(bool is_reboot)
 
 	op_display(OP_LOG, OP_MOD_INIT, 0x000C);
 
-	/* Start the kernel */
-	if (!is_reboot)
-		op_panel_disable_src_echo();
-
-	/* Clear SRCs on the op-panel when Linux starts */
-	op_panel_clear_src();
-
 	mem_dump_free();
 
 	/* Dump the selected console */
@@ -611,6 +601,9 @@ void __noreturn load_and_boot_kernel(bool is_reboot)
 		assert(0);
 	}
 
+	if (platform.exit)
+		platform.exit();
+
 	/* Take processors out of nap */
 	cpu_set_sreset_enable(false);
 	cpu_set_ipi_enable(false);
diff --git a/platforms/ibm-fsp/common.c b/platforms/ibm-fsp/common.c
index 573cd51861ee..97fba33aff59 100644
--- a/platforms/ibm-fsp/common.c
+++ b/platforms/ibm-fsp/common.c
@@ -193,6 +193,10 @@ void ibm_fsp_exit(void)
 
 	fsp_console_select_stdout();
 
+	op_panel_disable_src_echo();
+
+	/* Clear SRCs on the op-panel when Linux starts */
+	op_panel_clear_src();
 }
 
 int64_t ibm_fsp_cec_reboot(void)
-- 
2.21.0



More information about the Skiboot mailing list