From 9fc0c1287ada4d3ba50dcb76bbc3fc9beaae0bb1 Mon Sep 17 00:00:00 2001 From: Stewart Smith Date: Tue, 18 Jun 2019 17:29:16 +1000 Subject: Move FSP specific op-panel calls to platform.exit() 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 --- 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 55b5620..c2b7b70 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 573cd51..97fba33 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) -- cgit v1.1