Stop instructions before collecting dump
The instructions need to be stopped before attempting to collect
the hostboot dump. This commit calls stop instructions chip-op
on each processor SBE to make sure the instructions are stopped
before collecting the dump.
If some SBEs are not ready to accept the chip-op or timed out
the hostboot dump will not be collected from those SBEs and an
SBE dump will lbe collected in the case of a timeout.
Tests:
Tested hardware dump and hostboot dump successfully
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: I0b0ff9e6c6d62187a680395931de0a4dfaff579a
diff --git a/dump/sbe_dump_collector.hpp b/dump/sbe_dump_collector.hpp
index 2e99b53..55147a9 100644
--- a/dump/sbe_dump_collector.hpp
+++ b/dump/sbe_dump_collector.hpp
@@ -190,6 +190,26 @@
{
return SBETypes::PROC;
}
+
+ /**
+ * @brief Executes thread stop on a processor target
+ *
+ * If the Self Boot Engine (SBE) is not ready to accept chip operations
+ * (chip-ops), it logs the condition and excludes the processor from the
+ * dump collection process. For critical errors, such as a timeout during
+ * the stop operation, it logs the error and again excludes the processor.
+ * In case of SBE command failure or non-critical errors, it continues with
+ * the dump collection process.
+ *
+ * @param target Pointer to the pdbg target structure representing the
+ * processor to perform the thread stop on.
+ * @return true If the thread stop was successful or in case of non-critical
+ * errors where dump collection can proceed.
+ * @return false If the SBE is not ready for chip-ops or in case of critical
+ * errors like timeouts, indicating the processor should be
+ * excluded from the dump collection.
+ */
+ bool executeThreadStop(struct pdbg_target* target);
};
} // namespace openpower::dump::sbe_chipop