xref: /openbmc/openpower-proc-control/extensions/phal/dump_utils.hpp (revision 21a889fd116971f24cefe9331f3824f3099a290a)
1*21a889fdSJayanth Othayoth #include <cstdint>
2*21a889fdSJayanth Othayoth 
3*21a889fdSJayanth Othayoth #pragma once
4*21a889fdSJayanth Othayoth 
5*21a889fdSJayanth Othayoth namespace openpower::phal::dump
6*21a889fdSJayanth Othayoth {
7*21a889fdSJayanth Othayoth 
8*21a889fdSJayanth Othayoth constexpr auto SBE_DUMP_TIMEOUT = 4 * 60; // Timeout in seconds
9*21a889fdSJayanth Othayoth 
10*21a889fdSJayanth Othayoth /** @brief Dump types supported by dump request */
11*21a889fdSJayanth Othayoth enum class DumpType
12*21a889fdSJayanth Othayoth {
13*21a889fdSJayanth Othayoth     SBE
14*21a889fdSJayanth Othayoth };
15*21a889fdSJayanth Othayoth 
16*21a889fdSJayanth Othayoth /** @brief Structure for dump request parameters */
17*21a889fdSJayanth Othayoth struct DumpParameters
18*21a889fdSJayanth Othayoth {
19*21a889fdSJayanth Othayoth     uint32_t logId;
20*21a889fdSJayanth Othayoth     uint32_t unitId;
21*21a889fdSJayanth Othayoth     uint32_t timeout;
22*21a889fdSJayanth Othayoth     DumpType dumpType;
23*21a889fdSJayanth Othayoth };
24*21a889fdSJayanth Othayoth 
25*21a889fdSJayanth Othayoth /**
26*21a889fdSJayanth Othayoth  * Request a dump from the dump manager
27*21a889fdSJayanth Othayoth  *
28*21a889fdSJayanth Othayoth  * Request a dump from the dump manager and register a monitor for observing
29*21a889fdSJayanth Othayoth  * the dump progress.
30*21a889fdSJayanth Othayoth  *
31*21a889fdSJayanth Othayoth  * @param dumpParameters Parameters for the dump request
32*21a889fdSJayanth Othayoth  */
33*21a889fdSJayanth Othayoth void requestDump(const DumpParameters& dumpParameters);
34*21a889fdSJayanth Othayoth 
35*21a889fdSJayanth Othayoth } // namespace openpower::phal::dump
36