PLDM: implement surveillance between Host and bmc
This commit is to implement surveillance between host
and bmc, wherein host monitors if bmc is up and
running through constant pings(by sending Platform
EventMessages) sent from host to BMC. And if BMC
fails to respond to the pings, then BMC will be
reset using the KCS interface.
1. Host->BMC - GetTID
2. BMC->Host - Respond to GetTID, SetEventReceiver
3. Host->BMC - Respond to SetEventReceiver
4. BMC->Host - Send PlatformEventMessage after the
elapsed time interval(specified with
SetEventReceiver command)
4. Host->BMC - If BMC fails to send respond to host
within specified interval, Host resets BMC via
the KCS interface
Tested with PLDMTOOL:
SetEventReceiver command:
root@rain127bmc:/tmp# ./pldmtool base GetTID -m 8
Received Msg
08 01 81 00 02
Sending Msg
01 00 02 00 01
{
"Response": 1
}
platformEventMessage command(which will be received
by host):
root@rain118bmc:/tmp# ./pldmtool raw -d 0x80 0x02
0x0A 0x01 0x01 0x06 0x01 0x01
Request Message:
08 01 80 02 0a 01 01 06 01 01
Received Msg
08 01 80 02 0a 01 01 06 01 01
eventClass Checking
Sending Msg
00 02 0a 00 00
Response Message:
08 01 00 02 0a 00 00
Received Msg
08 01 00 02 0a 00 00
Signed-off-by: Sagar Srinivas <sagar.srinivas@ibm.com>
Change-Id: Iac90b2233a873a54504ffa649d324d30525b7ce3
diff --git a/meson.build b/meson.build
index 14b67d5..b06a082 100644
--- a/meson.build
+++ b/meson.build
@@ -33,6 +33,7 @@
conf_data.set_quoted('FRU_MASTER_JSON', join_paths(package_datadir, 'fru_master.json'))
conf_data.set_quoted('HOST_JSONS_DIR', join_paths(package_datadir, 'host'))
conf_data.set_quoted('EVENTS_JSONS_DIR', join_paths(package_datadir, 'events'))
+conf_data.set('HEARTBEAT_TIMEOUT', get_option('heartbeat-timeout-seconds'))
add_project_arguments('-DLIBPLDMRESPONDER', language : ['c','cpp'])
endif
if get_option('softoff').enabled()