PEL: Support new DeconfigFlag msg reg field

Add a new field to the PEL message registry to indicate that some
hardware associated with a callout was deconfigured.

"DeconfigFlag": true

This results in bit 6 in the SRC's hex word 5 being set.  It is looked
at by the code that creates the periodic PELs when there is a system
running with deconfigured hardware.

Note: For something to be considered deconfigured, it doesn't
necessarily mean that firmware chose to not configure it.  It could also
mean that it is broken or missing, at least in the case of power
supplies or fans.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I3e657cb52416fc50000e299bf2d583db7b67caf8
diff --git a/test/openpower-pels/registry_test.cpp b/test/openpower-pels/registry_test.cpp
index 12a205f..b33c07e 100644
--- a/test/openpower-pels/registry_test.cpp
+++ b/test/openpower-pels/registry_test.cpp
@@ -85,7 +85,8 @@
                         "Description": "bad voltage",
                         "AdditionalDataPropSource": "VOLTAGE"
                     }
-                }
+                },
+                "DeconfigFlag": true
             },
 
             "Documentation":
@@ -222,6 +223,7 @@
 
     EXPECT_EQ(entry->src.type, 0xBD);
     EXPECT_EQ(entry->src.reasonCode, 0x2333);
+    EXPECT_TRUE(entry->src.deconfigFlag);
 
     auto& hexwords = entry->src.hexwordADFields;
     EXPECT_TRUE(hexwords);
@@ -282,6 +284,7 @@
     EXPECT_EQ(entry->src.type, 0xBD);
     EXPECT_FALSE(entry->src.hexwordADFields);
     EXPECT_FALSE(entry->src.symptomID);
+    EXPECT_FALSE(entry->src.deconfigFlag);
 }
 
 TEST_F(RegistryTest, TestBadJSON)
diff --git a/test/openpower-pels/src_test.cpp b/test/openpower-pels/src_test.cpp
index f2ade68..ed8af4b 100644
--- a/test/openpower-pels/src_test.cpp
+++ b/test/openpower-pels/src_test.cpp
@@ -230,6 +230,7 @@
     // Validate more fields here as the code starts filling them in.
 
     // Ensure hex word 5 wasn't allowed to be set to TEST1's contents
+    // And that none of the error status flags are set
     EXPECT_EQ(hexwords[5 - 2], 0);
 
     // The user defined hex word fields specifed in the additional data.
@@ -491,6 +492,7 @@
     message::Entry entry;
     entry.src.type = 0xBD;
     entry.src.reasonCode = 0xABCD;
+    entry.src.deconfigFlag = true;
     entry.subsystem = 0x42;
 
     entry.callouts = R"(
@@ -555,6 +557,10 @@
 
         SRC src{entry, ad, dataIface};
 
+        const auto& hexwords = src.hexwordData();
+        auto mask = static_cast<uint32_t>(SRC::ErrorStatusFlags::deconfigured);
+        EXPECT_EQ(hexwords[5 - 2] & mask, mask);
+
         auto& callouts = src.callouts()->callouts();
         ASSERT_EQ(callouts.size(), 2);