diff --git a/extensions/phal/create_pel.cpp b/extensions/phal/create_pel.cpp
index 14d796d..c10f32c 100644
--- a/extensions/phal/create_pel.cpp
+++ b/extensions/phal/create_pel.cpp
@@ -86,6 +86,64 @@
     }
 }
 
+void createSbeErrorPEL(const std::string& event, const sbeError_t& sbeError,
+                       const FFDCData& ffdcData)
+{
+    std::map<std::string, std::string> additionalData;
+    auto bus = sdbusplus::bus::new_default();
+
+    additionalData.emplace("_PID", std::to_string(getpid()));
+    additionalData.emplace("SBE_ERR_MSG", sbeError.what());
+
+    for (auto& data : ffdcData)
+    {
+        additionalData.emplace(data);
+    }
+
+    std::vector<std::tuple<
+        sdbusplus::xyz::openbmc_project::Logging::server::Create::FFDCFormat,
+        uint8_t, uint8_t, sdbusplus::message::unix_fd>>
+        pelFFDCInfo;
+
+    // Refer phosphor-logging/extensions/openpower-pels/README.md section
+    // "Self Boot Engine(SBE) First Failure Data Capture(FFDC) Support"
+    // for details of related to createPEL with SBE FFDC information
+    // usin g CreateWithFFDCFiles api.
+    pelFFDCInfo.push_back(
+        std::make_tuple(sdbusplus::xyz::openbmc_project::Logging::server::
+                            Create::FFDCFormat::Custom,
+                        static_cast<uint8_t>(0xCB), static_cast<uint8_t>(0x01),
+                        sbeError.getFd()));
+    try
+    {
+        std::string service =
+            util::getService(bus, loggingObjectPath, loggingInterface);
+        auto method =
+            bus.new_method_call(service.c_str(), loggingObjectPath,
+                                loggingInterface, "CreateWithFFDCFiles");
+        auto level =
+            sdbusplus::xyz::openbmc_project::Logging::server::convertForMessage(
+                sdbusplus::xyz::openbmc_project::Logging::server::Entry::Level::
+                    Error);
+        method.append(event, level, additionalData, pelFFDCInfo);
+        auto resp = bus.call(method);
+    }
+    catch (const sdbusplus::exception::exception& e)
+    {
+        log<level::ERR>(fmt::format("D-Bus call exception",
+                                    "OBJPATH={}, INTERFACE={}, EXCEPTION={}",
+                                    loggingObjectPath, loggingInterface,
+                                    e.what())
+                            .c_str());
+        throw std::runtime_error(
+            "Error in invoking D-Bus logging create interface");
+    }
+    catch (std::exception& e)
+    {
+        throw e;
+    }
+}
+
 void createPEL(const std::string& event, const FFDCData& ffdcData)
 {
     std::map<std::string, std::string> additionalData;
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 = {});
