diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2023-05-13 22:12:25 +1000 |
---|---|---|
committer | Reza Arbab <arbab@linux.ibm.com> | 2023-06-06 13:32:12 -0500 |
commit | d2689980a3207508a8737c286ff0ab404bd482bc (patch) | |
tree | 4bd22a47cf21996d33e1e5e51924d409abb0937c /platforms | |
parent | 47488feb70d3fea5325174a391451e6e1d0c3cf1 (diff) | |
download | skiboot-d2689980a3207508a8737c286ff0ab404bd482bc.zip skiboot-d2689980a3207508a8737c286ff0ab404bd482bc.tar.gz skiboot-d2689980a3207508a8737c286ff0ab404bd482bc.tar.bz2 |
ipmi: flush the ipmi message queue before booting a kernel
Bring ipmi to a consistent state before booting a kernel by flushing
all outstanding messages. The OS may not start kicking the IPMI state
machine for some time.
For example, without this change, when booting in QEMU, the IPMI command
issued by ipmi_wdt_final_reset() to disable the watchdog is not sent to
the BMC before the OS boots, effectively leaving the watchdog enabled
until the OS begins to drive OPAL pollers.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Stewart Smith <stewart@flamingspork.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
Diffstat (limited to 'platforms')
-rw-r--r-- | platforms/astbmc/common.c | 6 | ||||
-rw-r--r-- | platforms/ibm-fsp/common.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/platforms/astbmc/common.c b/platforms/astbmc/common.c index 9ce22b3..bfbba2d 100644 --- a/platforms/astbmc/common.c +++ b/platforms/astbmc/common.c @@ -504,6 +504,12 @@ void astbmc_exit(void) ipmi_wdt_final_reset(); ipmi_set_boot_count(); + + /* + * Booting into an OS that may not call back into skiboot for + * some time. Ensure all IPMI messages are processed first. + */ + ipmi_flush(); } static const struct bmc_sw_config bmc_sw_ami = { diff --git a/platforms/ibm-fsp/common.c b/platforms/ibm-fsp/common.c index 4a723b2..f289d1f 100644 --- a/platforms/ibm-fsp/common.c +++ b/platforms/ibm-fsp/common.c @@ -186,6 +186,12 @@ void ibm_fsp_exit(void) /* Clear SRCs on the op-panel when Linux starts */ op_panel_clear_src(); + + /* + * Booting into an OS that may not call back into skiboot for + * some time. Ensure all IPMI messages are processed first. + */ + ipmi_flush(); } int64_t ibm_fsp_cec_reboot(void) |