Create PEL for boot errors with error XML data and traces

Add callback method into boot library to receive
status of boot load.

Add callback method into PHAL library to get back
traces logged so that the same can be used in
creation of PEL during failure.

Tested:
"User Data 1": {
    "Section Version": "1",
    "Sub-section type": "1",
    "Created by": "0x2000",
    "CBS_CS_IDLE_VALUE": "00000002",
    "CBS_CS_READ": "84000002",
    "HWP Error description": "CBS did not complete (did not arrive in IDLE
state) within timeout",
    "HW_DELAY": "0009c400",
    "HwpReturnCode": "RC_CBS_NOT_IN_IDLE_STATE",
    "LOG000 2020-03-08 06:26:34": "inf: p10_start_cbs:58 ",
    "LOG001 2020-03-08 06:26:34": "p10_start_cbs: Entering ...",
    "LOG002 2020-03-08 06:26:34": "err: CBS_NOT_IN_IDLE_STATE:36720 ",
    "LOG003 2020-03-08 06:26:34": "CBS did not complete (did not arrive in IDLE
state) within timeout",
    "LOG004 2020-03-08 06:26:34": "err: _setHwpError:114 ",
    "LOG005 2020-03-08 06:26:34": "_setHwpError: Creating HWP error 0xa97f5",
    "LOG006 2020-03-08 06:26:34": "err: p10_start_cbs:119 ",
    "LOG007 2020-03-08 06:26:34": "ERROR: CBS HAS NOT REACHED IDLE STATE VALUE
0x002 ",
    "LOOP_COUNT": "000000c8",
    "_PID": "495"
}

Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
Change-Id: I06491f09041edcd16d8db5890c74a4db8d08e920
diff --git a/phalerror/create_pel.hpp b/phalerror/create_pel.hpp
new file mode 100644
index 0000000..b80b642
--- /dev/null
+++ b/phalerror/create_pel.hpp
@@ -0,0 +1,33 @@
+#pragma once

+

+#include <sdbusplus/bus.hpp>

+#include <string>

+#include <vector>

+namespace openpower

+{

+namespace util

+{

+/**

+ * Get D-Bus service name for the specified object and interface

+ *

+ * @param[in] bus - sdbusplus D-Bus to attach to

+ * @param[in] objectPath - D-Bus object path

+ * @param[in] interface - D-Bus interface name

+ *

+ * @return service name on success and exception on failure

+ */

+std::string getService(sdbusplus::bus::bus& bus, const std::string& objectPath,

+                       const std::string& interface);

+} // namespace util

+namespace pel

+{

+using FFDCData = std::vector<std::pair<std::string, std::string>>;

+/**

+ * Create boot error PEL

+ *

+ * @param[in] ffdcData - failure data to append to PEL

+ */

+void createBootErrorPEL(const FFDCData& ffdcData);

+

+} // namespace pel

+} // namespace openpower