PEL: peltool: show hostboot deconfig/guard flags
The deconfig and guard flags in the SRC section are also valid for
hostboot SRCs, so display them in peltool for hostboot PELs.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I3a36d61ced592e0718e016665587444b7e14f964
diff --git a/extensions/openpower-pels/src.cpp b/extensions/openpower-pels/src.cpp
index 338c323..d78c07a 100644
--- a/extensions/openpower-pels/src.cpp
+++ b/extensions/openpower-pels/src.cpp
@@ -484,6 +484,17 @@
return false;
}
+bool SRC::isHostbootSRC() const
+{
+ auto as = asciiString();
+ if (as.length() >= 2)
+ {
+ uint8_t errorType = strtoul(as.substr(0, 2).c_str(), nullptr, 16);
+ return errorType == static_cast<uint8_t>(SRCType::hostbootError);
+ }
+ return false;
+}
+
std::optional<std::string> SRC::getErrorDetails(message::Registry& registry,
DetailLevel type,
bool toCache) const
@@ -741,6 +752,10 @@
_hexData[3] &
static_cast<uint32_t>(ErrorStatusFlags::terminateFwErr)),
1);
+ }
+
+ if (isBMCSRC() || isHostbootSRC())
+ {
jsonInsert(ps, "Deconfigured",
pv::boolString.at(
_hexData[3] &