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
diff --git a/extensions/openpower-pels/pel.hpp b/extensions/openpower-pels/pel.hpp
index 3498ae6..4cdbd1d 100644
--- a/extensions/openpower-pels/pel.hpp
+++ b/extensions/openpower-pels/pel.hpp
@@ -240,6 +240,12 @@
     void flatten(std::vector<uint8_t>& pelBuffer);
 
     /**
+     * @brief Check that the PEL fields that need to be in agreement
+     *        with each other are, and fix them up if necessary.
+     */
+    void checkRulesAndFix();
+
+    /**
      * @brief The PEL Private Header section
      */
     std::unique_ptr<PrivateHeader> _ph;