diff options
author | Andrew Geissler <geissonator@yahoo.com> | 2019-02-14 14:21:31 -0600 |
---|---|---|
committer | oohal <oohal@users.noreply.github.com> | 2019-07-30 16:52:41 +1000 |
commit | 2554cac82da530acfcb1a575c571e760de92dde4 (patch) | |
tree | 10090c492a84d72198dcdbe762de2e80f90cc00c /hw | |
parent | 0f9371da9a45343485ac41009f2669754ce31e76 (diff) | |
download | skiboot-2554cac82da530acfcb1a575c571e760de92dde4.zip skiboot-2554cac82da530acfcb1a575c571e760de92dde4.tar.gz skiboot-2554cac82da530acfcb1a575c571e760de92dde4.tar.bz2 |
Support BMC IPMI heartbeat command
A few years ago, the OpenBMC code added support for a "heartbeat"
command to send to the host. This command is used after the BMC is reset
to check if the host is running. Support was never added to the host
side however so currently when the BMC sends this command, this appears
in the host console:
IPMI: unknown OEM SEL command ff received
There is no response needed by the host (other then the low level
acknowledge of the command which already occurs). This commit
handles the command so the error is no longer printed (does nothing with
the command though since no action is needed). Here's the tested output
of this patch in the host console (with debug enabled):
IPMI: BMC issued heartbeat command: 00
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ipmi/ipmi-sel.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/hw/ipmi/ipmi-sel.c b/hw/ipmi/ipmi-sel.c index 59f45f8..794aa38 100644 --- a/hw/ipmi/ipmi-sel.c +++ b/hw/ipmi/ipmi-sel.c @@ -32,6 +32,7 @@ #define CMD_AMI_POWER 0x04 #define CMD_AMI_PNOR_ACCESS 0x07 #define CMD_AMI_OCC_RESET 0x0e +#define CMD_HEARTBEAT 0xff /* XXX: Listed here for completeness, registered in libflash/ipmi-flash.c */ #define CMD_OP_HIOMAP_EVENT 0x0f @@ -515,6 +516,13 @@ static void sel_power(uint8_t power, void *context __unused) } } +static void sel_heartbeat(uint8_t heartbeat, void *context __unused) +{ + /* There is only one sub-command so no processing needed */ + prlog(PR_DEBUG, "BMC issued heartbeat command: %02x\n", + heartbeat); +} + static uint32_t occ_sensor_id_to_chip(uint8_t sensor, uint32_t *chip) { struct dt_node *node, *bmc_node, *sensors_node; @@ -632,6 +640,12 @@ void ipmi_sel_init(void) prerror("Failed to register SEL handler for %s", stringify(CMD_AMI_PNOR_ACCESS)); } + + rc = ipmi_sel_register(CMD_HEARTBEAT, sel_heartbeat, NULL); + if (rc < 0) { + prerror("Failed to register SEL handler for %s", + stringify(CMD_HEARTBEAT)); + } } void ipmi_parse_sel(struct ipmi_msg *msg) |