OpenPOWER: Add support for Self Boot Engine(SBE) dump
SBE is a microcontroller that sits inside the processor
to initialize it to start the booting and also acts as a secure channel
for accessing certain control functions on the processor. During the
booting or other hardware access operations SBE can encounter errors
and become unresponsive. In such situations, the debug data needs to be
collected from such SBEs to find out the root cause of the error.
This data includes hardware state, configuration, memory, etc.
The collected data is then packaged into the OpenPOWER dump format
and which is called as SBE dump.
This commit adds implementation for SBE dump entry creation,
package, list, deletion and offload.
Tests:
Create entry
List entry
Delete entry
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: Iaaac90a83d68b51a0076bfe3c7d254b978b60309
diff --git a/dump-extensions/openpower-dumps/dump-extensions.cpp b/dump-extensions/openpower-dumps/dump-extensions.cpp
index c049fc9..8812c35 100644
--- a/dump-extensions/openpower-dumps/dump-extensions.cpp
+++ b/dump-extensions/openpower-dumps/dump-extensions.cpp
@@ -70,6 +70,24 @@
HARDWARE_DUMP_PATH, "hwdump", HARDWARE_DUMP_TMP_FILE_DIR,
HARDWARE_DUMP_MAX_SIZE, HARDWARE_DUMP_MIN_SPACE_REQD,
HARDWARE_DUMP_TOTAL_SIZE));
+
+ try
+ {
+ std::filesystem::create_directories(SBE_DUMP_PATH);
+ }
+ catch (std::exception& e)
+ {
+ log<level::ERR>(fmt::format("Failed to create SBE dump directory({})",
+ SBE_DUMP_PATH)
+ .c_str());
+ throw std::runtime_error("Failed to create SBE dump directory");
+ }
+
+ dumpList.push_back(std::make_unique<openpower::dump::hostdump::Manager<
+ sdbusplus::com::ibm::Dump::Entry::server::SBE>>(
+ bus, event, SBE_DUMP_OBJPATH, SBE_DUMP_OBJ_ENTRY, SBE_DUMP_PATH,
+ "sbedump", SBE_DUMP_TMP_FILE_DIR, SBE_DUMP_MAX_SIZE,
+ SBE_DUMP_MIN_SPACE_REQD, SBE_DUMP_TOTAL_SIZE));
}
} // namespace dump
} // namespace phosphor