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
diff --git a/dump-extensions/openpower-dumps/meson.build b/dump-extensions/openpower-dumps/meson.build
index d7d99a3..b1b51d1 100644
--- a/dump-extensions/openpower-dumps/meson.build
+++ b/dump-extensions/openpower-dumps/meson.build
@@ -62,6 +62,28 @@
description : 'Total size of the dump in kilo bytes'
)
+opconf_data.set_quoted('SBE_DUMP_OBJPATH', get_option('SBE_DUMP_OBJPATH'),
+ description : 'The SBE dump manager D-Bus path'
+ )
+opconf_data.set_quoted('SBE_DUMP_OBJ_ENTRY', get_option('SBE_DUMP_OBJ_ENTRY'),
+ description : 'The SBE dump entry D-Bus object path'
+ )
+opconf_data.set_quoted('SBE_DUMP_TMP_FILE_DIR', get_option('SBE_DUMP_TMP_FILE_DIR'),
+ description : 'Directory where SBE dump pieces are stored for packaging'
+ )
+opconf_data.set_quoted('SBE_DUMP_PATH', get_option('SBE_DUMP_PATH'),
+ description : 'Directory where SBE dumps are placed'
+ )
+opconf_data.set('SBE_DUMP_MAX_SIZE', get_option('SBE_DUMP_MAX_SIZE'),
+ description : 'Maximum size of one SBE dump in kilo bytes'
+ )
+opconf_data.set('SBE_DUMP_MIN_SPACE_REQD', get_option('SBE_DUMP_MIN_SPACE_REQD'),
+ description : 'Minimum space required for one SBE dump in kilo bytes'
+ )
+opconf_data.set('SBE_DUMP_TOTAL_SIZE', get_option('SBE_DUMP_TOTAL_SIZE'),
+ description : 'Total size of the dump in kilo bytes'
+ )
+
configure_file(configuration : opconf_data,
output : 'openpower_dumps_config.h'
)