pldm: Add support for OCC reset
BMC initiated OCC reset is translated to a SetStateEffecterStates
request for state effecter corresponding to the OCC instance.
Tested:
Invoked resetOCC path explicitly and verified that the
SetStateEffecterStates request message for OCCReset is accurate.
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Change-Id: I4e0d211b51151d24bf0112819fc9f201698bfac0
diff --git a/occ_status.cpp b/occ_status.cpp
index 6b19b76..502783d 100644
--- a/occ_status.cpp
+++ b/occ_status.cpp
@@ -93,6 +93,12 @@
// Sends message to host control command handler to reset OCC
void Status::resetOCC()
{
+#ifdef PLDM
+ if (resetCallBack)
+ {
+ this->resetCallBack(instance);
+ }
+#else
using namespace phosphor::logging;
constexpr auto CONTROL_HOST_PATH = "/org/open_power/control/host0";
constexpr auto CONTROL_HOST_INTF = "org.open_power.Control.Host";
@@ -109,6 +115,7 @@
method.append(std::variant<uint8_t>(std::get<0>(sensorMap.at(instance))));
bus.call_noreply(method);
return;
+#endif
}
// Handler called by Host control command handler to convey the