PEL: Add SBE FFDC process function

 Helper function to process SBE FFDC packet.
This function call libekb function to process the
FFDC packet and convert in to known format for PEL
specific file creation. This function also creates
json callout file and text type file, which includes
the addition debug data included in SBE FFDC packet.

Tested: Manually verified,

Sample test results with all the cores de-configured
system boot usecase.

"User Data 3": {
    "Section Version": "1",
    "Sub-section type": "1",
    "Created by": "0x2000",
    "Data": [
        {
            "Deconfigured": false,
            "Guarded": false,
            "LocationCode": "Ufcs-P0-C24",
            "MRUs": [
                {
                    "ID": 65536,
                    "Priority": "H"
                }
            ],
            "Priority": "H"
        }
    ]
},
"User Data 4": {
    "Section Version": "1",
    "Sub-section type": "3",
    "Created by": "0x2000",
    "Data": [
        "HWP_RC = RC_SBE_SELECT_EX_INSUFFICIENT_ACTIVE_CORES_ERROR",
        "HWP_RC_DESC = The requested active cores were
                       not able to be configured.",
        "HWP_FFDC_CHIP = 6b3a7570 306e3a30 3a30733a 00323070
             00000000 00000000 00000000 00000000 00000000
             00000000 00000000 00000000 00000000 00000000
             00000000 00000000",
        "HWP_FFDC_CORE_CONFIG = 00000000",
        "HWP_FFDC_ATTR_ACTIVE_CORES_NUM = 02",
        "HWP_FFDC_ACTIVE_CORES_NUM = 00000000",
        "HWP_FFDC_ACTIVE_CORES_VEC = 00000000",
        "HWP_CDG_TGT_01_LOC_CODE = Ufcs-P0-C24",
        "HWP_CDG_TGT_01_PHYS_PATH = physical:sys-0/node-0/proc-2",
        "HWP_CDG_TGT_01_CO_REQ = true",
        "HWP_CDG_TGT_01_CO_PRIORITY = HIGH",
        "HWP_CDG_TGT_01_DECONF_REQ = false",
        "HWP_CDG_TGT_01_GUARD_REQ = false",
        "HWP_CDG_TGT_01_GUARD_TYPE = GARD_Fatal"
    ]
}

Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
Change-Id: Iac2689c3608ddb0090a1c17753bbf9be96d12939
diff --git a/extensions/openpower-pels/entry_points.cpp b/extensions/openpower-pels/entry_points.cpp
index 1b14879..3a990f8 100644
--- a/extensions/openpower-pels/entry_points.cpp
+++ b/extensions/openpower-pels/entry_points.cpp
@@ -23,6 +23,7 @@
 #include <phosphor-logging/log.hpp>
 
 #ifdef SBE_FFDC_SUPPORTED
+#include <libekb.H>
 #include <libpdbg.h>
 #endif
 
@@ -64,6 +65,12 @@
         log<level::ERR>("pdbg_targets_init failed");
         throw std::runtime_error("pdbg target initialization failed");
     }
+
+    if (libekb_init())
+    {
+        log<level::ERR>("libekb_init failed");
+        throw std::runtime_error("libekb initialization failed");
+    }
 #endif
 }