PEL: Print SRC section into JSON

For BMC created errors, look up the reason code in
the message registry for error description and also
meaning of data stored in hexwords 6-9 (if any).

Added registry message field in peltool list output.

"Primary SRC": {
    "Section Version":          "1",
    "Sub-section type":         "1",
    "Created by":               "0x1000",
    "SRC Version":              "0x02",
    "SRC Format":               "0x55",
    "Power Control Net Fault":  "False",
    "Error Details": {
        "Message":              "PS 0x64 had a PGOOD Fault",
        "PS_NUM":               "0x64"
    },
    "Valid Word Count":         "0x09",
    "Reference Code":           "BD8D1001",
    "Hex Word 2":               "00000055",
    "Hex Word 3":               "00000010",
    "Hex Word 4":               "00000000",
    "Hex Word 5":               "00000000",
    "Hex Word 6":               "00000064",
    "Hex Word 7":               "00000000",
    "Hex Word 8":               "00000000",
    "Hex Word 9":               "00000000"
}

"Primary SRC": {
    "Section Version":          "1",
    "Sub-section type":         "0",
    "Created by":               "0x4552",
    "SRC Version":              "0x02",
    "SRC Format":               "0x2008000",
    "Power Control Net Fault":  "False",
    "Valid Word Count":         "0x04",
    "Reference Code":           "B2001020",
    "Hex Word 2":               "02008000",
    "Hex Word 3":               "00000000",
    "Hex Word 4":               "00000012",
    "Callout Section": {
        "Callout Count":        "1",
        "Callouts": [{
            "FRU Type":         "Symbolic FRU",
            "Priority":         "Medium Priority",
            "Part Number":      "NEXTLVL"
        }]
    }
}

Testing: Manually run peltool and verified out. All unit tests passed.
Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com>
Change-Id: I124627ba785413ebda02305b7d9f95431922e714
diff --git a/extensions/openpower-pels/pel_values.cpp b/extensions/openpower-pels/pel_values.cpp
index cb00150..7e7f93b 100644
--- a/extensions/openpower-pels/pel_values.cpp
+++ b/extensions/openpower-pels/pel_values.cpp
@@ -206,12 +206,12 @@
  * The possible values for the Callout Priority field in the SRC.
  */
 const PELValues calloutPriorityValues = {
-    {'H', "high", "Mandatory, replace all with this type as a unit"},
-    {'M', "medium", "Medium Priority"},
-    {'A', "medium_group_a", "Medium Priority A, replace these as a group"},
-    {'B', "medium_group_b", "Medium Priority B, replace these as a group"},
-    {'C', "medium_group_c", "Medium Priority C, replace these as a group"},
-    {'L', "low", "Lowest priority replacement"}};
+    {0x48, "high", "Mandatory, replace all with this type as a unit"},
+    {0x4D, "medium", "Medium Priority"},
+    {0x41, "medium_group_a", "Medium Priority A, replace these as a group"},
+    {0x42, "medium_group_b", "Medium Priority B, replace these as a group"},
+    {0x43, "medium_group_c", "Medium Priority C, replace these as a group"},
+    {0x4C, "low", "Lowest priority replacement"}};
 
 PELValues::const_iterator findByValue(uint32_t value, const PELValues& fields)
 {
@@ -235,7 +235,6 @@
  * @brief Map for section IDs
  */
 const std::map<std::string, std::string> sectionTitles = {
-
     {"PH", "Private Header"},
     {"UH", "User Header"},
     {"PS", "Primary SRC"},
@@ -244,7 +243,7 @@
     {"MT", "Failing MTMS"},
     {"DH", "Dump Location"},
     {"SW", "Firmware Error"},
-    {"LP", "Impacted Part"},
+    {"LP", "Impacted Partition"},
     {"LR", "Logical Resource"},
     {"HM", "HMC ID"},
     {"EP", "EPOW"},
@@ -253,8 +252,32 @@
     {"CH", "Call Home"},
     {"UD", "User Data"},
     {"EI", "Env Info"},
-    {"ED", "Extended User Data"},
-};
+    {"ED", "Extended User Data"}};
+
+/**
+ * @brief Map for Procedure Descriptions
+ */
+const std::map<std::string, std::string> procedureDesc = {{"TODO", "TODO"}};
+
+/**
+ * @brief Map for Callout Failing Component Types
+ */
+const std::map<uint8_t, std::string> failingComponentType = {
+    {0x10, "Normal Hardware FRU"},
+    {0x20, "Code FRU"},
+    {0x30, "Configuration error, configuration procedure required"},
+    {0x40, "Maintenance Procedure Required"},
+    {0x90, "External FRU"},
+    {0xA0, "External Code FRU"},
+    {0xB0, "Tool FRU"},
+    {0xC0, "Symbolic FRU"},
+    {0xE0, "Symbolic FRU with trusted location code"}};
+
+/**
+ * @brief Map for Boolean value
+ */
+const std::map<bool, std::string> boolString = {{true, "True"},
+                                                {false, "False"}};
 
 /**
  * @brief Map for creator IDs