PHAL: added createSbePEL wrapper function
Added wrapper function to create SBE PEL based on event type
and user provided additional SBE provided FFDC information
Refer phosphor-logging/extensions/openpower-pels/README.md section
"Self Boot Engine(SBE) First Failure Data Capture(FFDC) Support"
for details on this implementation.
Tested: verified PEL log
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
Change-Id: Ice41e224d92a773090d601d3154b4c30bdd09c02
diff --git a/extensions/phal/create_pel.hpp b/extensions/phal/create_pel.hpp
index 0081c68..e6d49a5 100644
--- a/extensions/phal/create_pel.hpp
+++ b/extensions/phal/create_pel.hpp
@@ -1,5 +1,7 @@
#pragma once
+#include <phal_exception.H>
+
#include <nlohmann/json.hpp>
#include <string>
@@ -12,8 +14,10 @@
using json = nlohmann::json;
+using namespace openpower::phal;
+
/**
- * Create boot error PEL
+ * @brief Create boot error PEL
*
* @param[in] ffdcData - failure data to append to PEL
* @param[in] calloutData - callout data to append to PEL
@@ -21,9 +25,19 @@
void createBootErrorPEL(const FFDCData& ffdcData, const json& calloutData);
/**
+ * @brief Create SBE boot error PEL
+ *
+ * @param[in] event - the event type
+ * @param[in] sbeError - SBE error object
+ * @param[in] ffdcData - failure data to append to PEL
+ */
+void createSbeErrorPEL(const std::string& event, const sbeError_t& sbeError,
+ const FFDCData& ffdcData);
+
+/**
* @brief Create a PEL for the specified event type and additional data
*
- * @param event - the event type
+ * @param[in] event - the event type
* @param[in] ffdcData - failure data to append to PEL
*/
void createPEL(const std::string& event, const FFDCData& ffdcData = {});