@@ -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);
@@ -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)
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@linux.ibm.com> --- core/init.c | 13 +++---------- platforms/ibm-fsp/common.c | 4 ++++ 2 files changed, 7 insertions(+), 10 deletions(-)