Add bios post checking support
Some sensors aren't available until after bios post
add support to check for post when needed.
Tested-by: SSB temp no longer asserted thresholds before
bios post.
Change-Id: I9251c2c501e082ef4bb0e9eb7909dc137771e120
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/src/IpmbSensor.cpp b/src/IpmbSensor.cpp
index 71d4a5b..af1f725 100644
--- a/src/IpmbSensor.cpp
+++ b/src/IpmbSensor.cpp
@@ -166,6 +166,10 @@
{
return;
}
+ else if (readState == PowerState::biosPost && !hasBiosPost())
+ {
+ return;
+ }
thresholds::checkThresholds(this);
}
@@ -306,6 +310,16 @@
dbusConnection, io, name, pathPair.first, objectServer,
std::move(sensorThresholds), deviceAddress);
+ auto findPowerState = entry.second.find("PowerState");
+
+ if (findPowerState != entry.second.end())
+ {
+ std::string powerState = std::visit(
+ VariantToStringVisitor(), findPowerState->second);
+
+ setReadState(powerState, sensor->readState);
+ }
+
if (sensorClass == "PxeBridgeTemp")
{
sensor->type = IpmbType::PXE1410CVR;