PHAL: Log Informational error for PEL created during poweroff
1)Log informational PELS in case system state is transitioning to
power-off for IPL procedures/hardware access failures
2) Don't add callouts to PEL's created during transition to
power-off as the CEC will not be in expected state.
Tested: transition to poweroff
root@xxxbmc:/usr# peltool -lfh
{
"0x50003BEB": {
"SRC": "BD503001",
"Message": "Failure occurred during boot process",
"PLID": "0x50003BEB",
"CreatorID": "BMC",
"Subsystem": "CEC Hardware",
"Commit Time": "05/23/2022 13:57:53",
"Sev": "Informational Event",
"CompID": "0x3000"
}
}
root@xxxbmc:~# peltool -i 0x50003be0
{
"Private Header": {
"Section Version": "1",
"Sub-section type": "0",
"Created by": "0x3000",
"Created at": "05/23/2022 13:48:12",
"Committed at": "05/23/2022 13:48:12",
"Creator Subsystem": "BMC",
"CSSVER": "",
"Platform Log Id": "0x50003BE0",
"Entry Id": "0x50003BE0",
"BMC Event Log Id": "510"
},
"User Header": {
"Section Version": "1",
"Sub-section type": "0",
"Log Committed by": "0x2000",
"Subsystem": "CEC Hardware",
"Event Scope": "Entire Platform",
"Event Severity": "Informational Event",
"Event Type": "Miscellaneous, Informational Only",
"Action Flags": [
"Event not customer viewable",
"Report Externally"
],
"Host Transmission": "Not Sent",
"HMC Transmission": "Not Sent"
},
.
.
.
Tested: transition to running
root@ever8bmc:/tmp# peltool -i 0x50003CF9
{
"Private Header": {
"Section Version": "1",
"Sub-section type": "0",
"Created by": "0x3000",
},
"User Header": {
"Section Version": "1",
"Sub-section type": "0",
"Log Committed by": "0x2000",
"Subsystem": "CEC Hardware",
"Event Scope": "Entire Platform",
"Event Severity": "Unrecoverable Error",
},
"User Data 0": {
"Created by": "0x2000",
"BMCState": "Ready",
"BootState": "Unspecified",
"ChassisState": "On",
"FW Version ID": "fw1020.00-57.7-2-gd86188a773",
"HostState": "TransitioningToRunning",
"Process Name": "/usr/bin/openpower-proc-control",
"System IM": "50003000"
},
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
Change-Id: I078d5cba2e0fb705bf424d2f8f3010f2cd2063bb
diff --git a/util.hpp b/util.hpp
index 19a162e..442bd22 100644
--- a/util.hpp
+++ b/util.hpp
@@ -19,5 +19,14 @@
*/
std::string getService(sdbusplus::bus::bus& bus, const std::string& objectPath,
const std::string& interface);
+
+/**
+ * Returns true if host is in poweringoff state else false
+ *
+ * @return bool - true if host is powering off else false. if failed
+ * to read property false will be returned.
+ */
+bool isHostPoweringOff();
+
} // namespace util
} // namespace openpower