PEL: Look for JSON Guard & Deconfig fields

There are optional 'Guarded' and 'Deconfigured' fields in the callout
JSON.  If these are set, there are some bits in the SRC that should be
set.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I1bde74094fc596f383d683722d769615cba56975
diff --git a/extensions/openpower-pels/src.cpp b/extensions/openpower-pels/src.cpp
index 1861608..226bc28 100644
--- a/extensions/openpower-pels/src.cpp
+++ b/extensions/openpower-pels/src.cpp
@@ -666,6 +666,18 @@
         }
         // The PEL spec calls it a backplane, so call it that here.
         jsonInsert(ps, "Backplane CCIN", ccinString, 1);
+
+        jsonInsert(ps, "Deconfigured",
+                   pv::boolString.at(
+                       _hexData[3] &
+                       static_cast<uint32_t>(ErrorStatusFlags::deconfigured)),
+                   1);
+
+        jsonInsert(
+            ps, "Guarded",
+            pv::boolString.at(_hexData[3] &
+                              static_cast<uint32_t>(ErrorStatusFlags::guarded)),
+            1);
     }
 
     auto errorDetails = getErrorDetails(registry, DetailLevel::json, true);
@@ -1158,6 +1170,22 @@
         }
 
         addInventoryCallout(inventoryPath, priority, lc, dataIface, mrus);
+
+        if (jsonCallout.contains("Deconfigured"))
+        {
+            if (jsonCallout.at("Deconfigured").get<bool>())
+            {
+                setErrorStatusFlag(ErrorStatusFlags::deconfigured);
+            }
+        }
+
+        if (jsonCallout.contains("Guarded"))
+        {
+            if (jsonCallout.at("Guarded").get<bool>())
+            {
+                setErrorStatusFlag(ErrorStatusFlags::guarded);
+            }
+        }
     }
 
     if (callout)