summaryrefslogtreecommitdiffstats
path: root/extensions/openpower-pels
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2020-01-07 12:53:16 -0600
committerMatt Spinler <spinler@us.ibm.com>2020-02-14 19:15:42 +0000
commite95fd0154e723813f5d7bf981e97b7ca6f28f7ef (patch)
treea15da0b78a78ef7397bfa38c87c78e0765eb379b /extensions/openpower-pels
parent05c2c6c4f7b8904f27ae10af39b63b53dc2c3136 (diff)
downloadphosphor-logging-e95fd0154e723813f5d7bf981e97b7ca6f28f7ef.tar.gz
phosphor-logging-e95fd0154e723813f5d7bf981e97b7ca6f28f7ef.zip
PEL: New event log when receiving bad host PEL
Create a new event log/PEL when a PEL comes in from the host but it isn't valid. The PEL subsystem used is 'platform firmware' because the code won't know which specific host subsystem it came from. The severity is unrecoverable as opposed to informational to make it easier to notice. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I933e5c82f1ef755c6266604fbdec6d0c1fe5b784
Diffstat (limited to 'extensions/openpower-pels')
-rw-r--r--extensions/openpower-pels/manager.cpp21
-rw-r--r--extensions/openpower-pels/registry/message_registry.json37
2 files changed, 56 insertions, 2 deletions
diff --git a/extensions/openpower-pels/manager.cpp b/extensions/openpower-pels/manager.cpp
index 40501a5..05ccb42 100644
--- a/extensions/openpower-pels/manager.cpp
+++ b/extensions/openpower-pels/manager.cpp
@@ -100,10 +100,27 @@ void Manager::addRawPEL(const std::string& rawPelPath, uint32_t obmcLogID)
}
else
{
- log<level::ERR>("Invalid PEL found",
+ log<level::ERR>("Invalid PEL received from the host",
entry("PELFILE=%s", rawPelPath.c_str()),
entry("OBMCLOGID=%d", obmcLogID));
- // TODO, make a whole new OpenBMC event log + PEL
+
+ AdditionalData ad;
+ ad.add("PLID", getNumberString("0x%08X", pel->plid()));
+ ad.add("OBMC_LOG_ID", std::to_string(obmcLogID));
+ ad.add("RAW_PEL_FILENAME", rawPelPath);
+ ad.add("PEL_SIZE", std::to_string(data.size()));
+
+ std::string asciiString;
+ auto src = pel->primarySRC();
+ if (src)
+ {
+ asciiString = (*src)->asciiString();
+ }
+
+ ad.add("SRC", asciiString);
+
+ _eventLogger.log("org.open_power.Logging.Error.BadHostPEL",
+ Entry::Level::Error, ad);
}
}
else
diff --git a/extensions/openpower-pels/registry/message_registry.json b/extensions/openpower-pels/registry/message_registry.json
index 6b4ab45..12b977b 100644
--- a/extensions/openpower-pels/registry/message_registry.json
+++ b/extensions/openpower-pels/registry/message_registry.json
@@ -160,6 +160,43 @@
"The host firmware rejected that PEL."
]
}
+ },
+
+ {
+ "Name": "org.open_power.Logging.Error.BadHostPEL",
+ "Subsystem": "platform_firmware",
+ "Severity": "unrecoverable",
+
+ "SRC":
+ {
+ "ReasonCode": "0x2002",
+ "Words6To9":
+ {
+ "6":
+ {
+ "Description": "The PLID of the invalid PEL",
+ "AdditionalDataPropSource": "PLID"
+ },
+ "7":
+ {
+ "Description": "The corresponding OpenBMC event log ID",
+ "AdditionalDataPropSource": "OBMC_LOG_ID"
+ },
+ "8":
+ {
+ "Description": "The size of the invalid PEL",
+ "AdditionalDataPropSource": "PEL_SIZE"
+ }
+ }
+ },
+
+ "Documentation":
+ {
+ "Description": "The host sent the BMC an invalid PEL",
+ "Message": "The host sent the BMC an invalid PEL",
+ "Notes": [
+ ]
+ }
}
]
}
OpenPOWER on IntegriCloud