summaryrefslogtreecommitdiffstats
path: root/extensions/openpower-pels/pel_types.hpp
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2019-11-01 11:31:31 -0500
committerMatt Spinler <spinler@us.ibm.com>2019-11-08 15:22:50 +0000
commitf1e85e20a1a6e97e27737b5883a8aa6a63c79b22 (patch)
treee05b1fe902dbd98e7232b093db226263221ec618 /extensions/openpower-pels/pel_types.hpp
parent97f7abcf70cead9fbed2719545faa13f870d0f02 (diff)
downloadphosphor-logging-f1e85e20a1a6e97e27737b5883a8aa6a63c79b22.tar.gz
phosphor-logging-f1e85e20a1a6e97e27737b5883a8aa6a63c79b22.zip
PEL: Validate the Action Flags field
According to the PEL spec, the Action Flags and Event Type fields in the User Header section must be in agreement with the Severity field. So, when a PEL is being created from an OpenBMC event log, check those values for correctness and fix them up if required. In addition, as those fields are optional in the message registry, this code will also just set these two fields to valid values if they were left out. The rules being followed are documented in the PEL readme. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Iad88de5080ba79a9ff31f962ef99bfc11994b9ed
Diffstat (limited to 'extensions/openpower-pels/pel_types.hpp')
-rw-r--r--extensions/openpower-pels/pel_types.hpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/extensions/openpower-pels/pel_types.hpp b/extensions/openpower-pels/pel_types.hpp
index d19c875..ae886eb 100644
--- a/extensions/openpower-pels/pel_types.hpp
+++ b/extensions/openpower-pels/pel_types.hpp
@@ -79,7 +79,9 @@ enum class EventScope
*/
enum class EventType
{
- notApplicable = 0x00
+ notApplicable = 0x00,
+ miscInformational = 0x01,
+ tracing = 0x02
};
/**
@@ -97,5 +99,25 @@ enum class SeverityType
symptom = 0x70
};
+/**
+ * @brief The Action Flags values with the bit
+ * numbering needed by std::bitset.
+ *
+ * Not an enum class so that casting isn't needed
+ * by the bitset operations.
+ */
+enum ActionFlagsBits
+{
+ serviceActionFlagBit = 15, // 0x8000
+ hiddenFlagBit = 14, // 0x4000
+ reportFlagBit = 13, // 0x2000
+ dontReportToHostFlagBit = 12, // 0x1000
+ callHomeFlagBit = 11, // 0x0800
+ isolationIncompleteFlagBit = 10, // 0x0400
+ spCallHomeFlagBit = 8, // 0x0100
+ osSWErrorBit = 7, // 0x0080
+ osHWErrorBit = 6 // 0x0040
+};
+
} // namespace pels
} // namespace openpower
OpenPOWER on IntegriCloud