blob: 96de90221f6722d37be89e469f3ee66864907049 [file] [log] [blame]
Ben Tyner0205f3b2020-02-24 10:24:47 -06001#pragma once
2
Ben Tyner7029e522021-08-09 19:18:24 -05003#include <attn/attn_dump.hpp>
4
Ben Tyner0205f3b2020-02-24 10:24:47 -06005namespace analyzer
6{
7
Zane Shelleyebff0d32021-11-21 10:52:07 -06008enum class AnalysisType
9{
10 /**
11 * Queries for the root cause of a system checkstop attention. An
12 * unrecoverable PEL will be logged containing any necessary service actions
13 * and the associated FFDC from analysis.
14 */
15 SYSTEM_CHECKSTOP,
16
17 /**
18 * Queries for any active recoverable or unit checkstop attentions that may
19 * be attributed to a Terminate Immediate (TI) event. If any are found, an
20 * predictive PEL will be logged containing any necessary service actions
21 * and the associated FFDC from analysis.
22 */
23 TERMINATE_IMMEDIATE,
24
25 /**
26 * Queries for any active attentions. If any are found, an informational PEL
27 * will be logged containing the FFDC from analysis (no service actions
28 * applied).
29 */
30 MANUAL,
31};
32
Ben Tyner0205f3b2020-02-24 10:24:47 -060033/**
Zane Shelleyebff0d32021-11-21 10:52:07 -060034 * @brief Queries all chips in the host hardware for any active attentions.
35 * Then, it will perform any required RAS service actions based on the
36 * given analysis type.
Ben Tyner0205f3b2020-02-24 10:24:47 -060037 *
Zane Shelleyebff0d32021-11-21 10:52:07 -060038 * @param i_type The type of analysis to perform. See enum above.
39 *
40 * @param o_dump The returned dump data. This data is only set if the input
41 * value of i_type is SYSTEM_CHECKSTOP.
42 *
Zane Shelley611b3442021-11-19 16:02:01 -060043 * @return The platform log ID (PLID) of the PEL generated during analysis. Will
44 * return zero if no PEL is generated.
Ben Tyner0205f3b2020-02-24 10:24:47 -060045 */
Zane Shelleyebff0d32021-11-21 10:52:07 -060046uint32_t analyzeHardware(AnalysisType i_type, attn::DumpParameters& o_dump);
Ben Tyner0205f3b2020-02-24 10:24:47 -060047
Ben Tynereea45422021-04-15 10:54:14 -050048/**
49 * @brief Get error analyzer build information
50 *
51 * @return Pointer to build information
52 */
53const char* getBuildInfo();
54
Ben Tyner0205f3b2020-02-24 10:24:47 -060055} // namespace analyzer