diff options
author | Andrew Geissler <geissonator@yahoo.com> | 2019-02-14 14:21:31 -0600 |
---|---|---|
committer | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2019-08-06 14:14:56 +0530 |
commit | 35c24ebce598818606528656ad93f4286d88e474 (patch) | |
tree | 67a6eb77faa364cf433a1dea9e5c5f90fda73bdd | |
parent | 8757b12d44ebafa70eb9d8af8ffb39b1ed4872e5 (diff) | |
download | skiboot-35c24ebce598818606528656ad93f4286d88e474.zip skiboot-35c24ebce598818606528656ad93f4286d88e474.tar.gz skiboot-35c24ebce598818606528656ad93f4286d88e474.tar.bz2 |
Support BMC IPMI heartbeat command
[ Upstream commit 2554cac82da530acfcb1a575c571e760de92dde4 ]
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>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
-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 0996275..76c893e 100644 --- a/hw/ipmi/ipmi-sel.c +++ b/hw/ipmi/ipmi-sel.c @@ -45,6 +45,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 @@ -528,6 +529,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; @@ -645,6 +653,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) |