Collect SBE dump during chip-op timeouts
Add support for collecting SBE dump during dump chip-op
failure.
- Request SBE dump in the case of a chip-op timeout
- Wait for the dump to complete the timeout
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: I2f6693a3136803f3555d7e5dc00528bb9d004cdf
diff --git a/dump/dump_utils.hpp b/dump/dump_utils.hpp
index 8918024..105884a 100644
--- a/dump/dump_utils.hpp
+++ b/dump/dump_utils.hpp
@@ -1,5 +1,7 @@
#pragma once
+#include "sbe_type.hpp"
+
#include <sdbusplus/server.hpp>
#include <filesystem>
@@ -9,6 +11,8 @@
namespace openpower::dump::util
{
+constexpr auto SBE_DUMP_TIMEOUT = 4 * 60; // Timeout in seconds
+
using DumpCreateParams =
std::map<std::string, std::variant<std::string, uint64_t>>;
@@ -81,4 +85,17 @@
auto reply = bus.call(method);
}
+/**
+ * Request SBE dump from the dump manager
+ *
+ * Request SBE dump from the dump manager and register a monitor for observing
+ * the dump progress.
+ *
+ * @param failingUnit The id of the proc containing failed SBE
+ * @param eid Error log id associated with dump
+ * @param sbeType Type of the SBE
+ */
+void requestSBEDump(const uint32_t failingUnit, const uint32_t eid,
+ SBETypes sbeType);
+
} // namespace openpower::dump::util