Clear flags when the host changes to powered off state
When the host is powered off, the OCCs will be stopped, so clear any
reset pending flags as well as any outstanding HRESET requests.
This will ensure the next boot will start clean and not react to
something that happened on prior boot.
Tested on Rainier for several error scenarios.
Change-Id: Ie4156975a844e823787f7162ee0542d7f099bd12
Signed-off-by: Chris Cain <cjcain@us.ibm.com>
diff --git a/occ_manager.hpp b/occ_manager.hpp
index fa34bf4..b11756d 100644
--- a/occ_manager.hpp
+++ b/occ_manager.hpp
@@ -162,6 +162,10 @@
*/
void setSensorValueToNonFunctional(uint32_t id) const;
+ /** @brief Clear any state flags that need to be reset when the host state
+ * is off */
+ void hostPoweredOff();
+
private:
/** @brief Creates the OCC D-Bus objects.
*/
@@ -358,8 +362,8 @@
#ifdef PLDM
/**
* @brief Timer used to throttle PLDM traces when there are problems
- determining the OCC status via pldm. Used to prevent excessive
- journal traces.
+ determining the OCC status via pldm. Used to prevent excessive
+ journal traces.
*/
std::unique_ptr<
sdeventplus::utility::Timer<sdeventplus::ClockId::Monotonic>>