PEL: Add the DRAM manufacturer info of DIMM callout in UD section

Add the called out DIMMs DRAM manufacturer info to the user data
section of the PEL to assist the service engineers in identifying the
manufacturer of the faulty DRAMs packaged within the DIMM module
directly from the logs, aiding in quick resolution.

The changes also moves the pdbg target and libekb initialization to
the PEL startup which avoids the need of multiple initialization as
the existing design.

When a PEL calls out a DIMM FRU, the DRAM manufacturer ID and the
expanded location code of those DIMMs are added to the SysInfo user
data section  of the generated PEL in JSON format under the key 'DIMMs
Additional Info'.

In case of  any errors occur during the collection or processing of
the manufacturer data, the error messages will be logged in the 'PEL
Internal Debug Data' section as a JSON array under the key 'DIMMs Info
Fetch Error' as a separate user data section.

Tested :

Below is a portion of PEL(callout section and User Data section are
shown) which callout the DIMM P0-C32.

```
"Hex Word 9":               "00000000",
    "Callout Section": {
        "Callout Count":        "1",
        "Callouts": [{
            "FRU Type":         "Normal Hardware FRU",
            "Priority":         "Mandatory, replace all with this
                                 type as a unit",
            "Location Code":    "UXXX.YYY.WWW004A-P0-C32",
            "Part Number":      "7777777",
            "CCIN":             "1234",
            "Serial Number":    "YYYYYY"
        }]
    }
```
"User Data": {
    "Section Version": "1",
    "Sub-section type": "1",
    "Created by": "bmc error logging",
    "BMCLoad": "0.65 0.69 0.64",
    "BMCState": "Ready",
    "BMCUptime": "0y 0d 0h 17m 43s",
    "BootState": "Unspecified",
    "ChassisState": "Off",
    "DIMMs Additional Info": [
        {
            "DRAM Manufacturer ID": [
                "0x88",
                "0xAA"
            ]
            "Location Code": "UXXX.YYY.WWW004A-P0-C32",
        }
    ],
    "FW Version ID": "fw1060.20-4-1060.2432.20240729a (NL1060_068)",
    "HostState": "Off",
    "System IM": "50001001"
}
```

Change-Id: I2ff81c66e63b99e8e84378ec78f586fb9b6322d7
Signed-off-by: Arya K Padman <aryakpadman@gmail.com>
diff --git a/extensions/openpower-pels/pel.hpp b/extensions/openpower-pels/pel.hpp
index 8abefa4..5586187 100644
--- a/extensions/openpower-pels/pel.hpp
+++ b/extensions/openpower-pels/pel.hpp
@@ -30,6 +30,7 @@
 };
 
 using PelFFDC = std::vector<PelFFDCfile>;
+using DebugData = std::map<std::string, std::vector<std::string>>;
 
 constexpr uint8_t jsonCalloutSubtype = 0xCA;
 
@@ -416,6 +417,20 @@
                             const JournalBase& journal);
 
     /**
+     * @brief API to collect the addditional details of the DIMM callouts in
+     * the PEL as a JSON object in adSysInfoData.
+     *
+     * @param[in] src - Unique pointer to the SRC object
+     * @param[in] dataIface - The data interface object
+     * @param[out] adSysInfoData - The additional data to SysInfo in json format
+     * @param[out] debugData - The map of string and vector of string to store
+     * the debug data if any.
+     */
+    void addAdDetailsForDIMMsCallout(
+        const std::unique_ptr<SRC>& src, const DataInterfaceBase& dataIface,
+        nlohmann::json& adSysInfoData, DebugData& debugData);
+
+    /**
      * @brief The PEL Private Header section
      */
     std::unique_ptr<PrivateHeader> _ph;
@@ -466,12 +481,16 @@
  * @param[in] dataIface - The data interface object
  * @param[in] addUptime - Whether to add the uptime attribute the default is
  *                        true
+ * @param[in] adSysInfoData - The additional data to SysInfo in json format.
+ *                            Default value will be empty.
  *
  * @return std::unique_ptr<UserData> - The section
  */
 std::unique_ptr<UserData> makeSysInfoUserDataSection(
     const AdditionalData& ad, const DataInterfaceBase& dataIface,
-    bool addUptime = true);
+    bool addUptime = true,
+    const nlohmann::json& adSysInfoData =
+        nlohmann::json(nlohmann::json::value_t::object));
 
 /**
  * @brief Reads data from an opened file descriptor.
@@ -493,6 +512,19 @@
     makeFFDCuserDataSection(uint16_t componentID, const PelFFDCfile& file);
 
 /**
+ * @brief To create JSON object with the given location code and the hex
+ * converted value of the given DI property.
+ *
+ * @param[in] locationCode - The location code of the DIMM
+ * @param[in] diPropVal - The DI property value of the DIMM
+ * @param[out] adSysInfoData - Holds the created JSON object
+ */
+
+void addDIMMInfo(const std::string& locationCode,
+                 const std::vector<std::uint8_t>& diPropVal,
+                 nlohmann::json& adSysInfoData);
+
+/**
  * @brief Flattens a vector of strings into a vector of bytes suitable
  *        for storing in a PEL section.
  *