1 #pragma once
2 
3 namespace attn
4 {
5 
6 /** @brief Attention handler return codes */
7 enum ReturnCodes
8 {
9     RC_SUCCESS        = 0,
10     RC_NOT_HANDLED    = 1,
11     RC_ANALYZER_ERROR = 2,
12     RC_CFAM_ERROR     = 3,
13     RC_DBUS_ERROR     = 4
14 };
15 
16 /** @brief Code seciton for error reporing */
17 enum class AttnSection
18 {
19     reserved        = 0x0000,
20     attnHandler     = 0x0100,
21     tiHandler       = 0x0200,
22     handlePhypTi    = 0x0300,
23     handleHbTi      = 0x0400,
24     addHbStatusRegs = 0x0500
25 };
26 
27 /** @brief Attention handler error reason codes */
28 enum AttnCodes
29 {
30     ATTN_NO_ERROR  = 0,
31     ATTN_INFO_NULL = 1,
32     ATTN_PDBG_CFAM = 2,
33     ATTN_PDBG_SCOM = 3
34 };
35 
36 enum class HostState
37 {
38     Quiesce,
39     Diagnostic,
40     Crash
41 };
42 
43 /**
44  * @brief Transition the host state
45  *
46  * We will transition the host state by starting the appropriate dbus target.
47  *
48  * @param i_hostState the state to transition the host to
49  */
50 void transitionHost(const HostState i_hostState);
51 
52 /**
53  * @brief Traces some regs for hostboot
54  *
55  * When we receive a Checkstop or special Attention Term Immediate,
56  * hostboot wants some regs added to the error log. We will do this
57  * by tracing them and then the traces will get added to the error
58  * log later.
59  *
60  * @return nothing
61  */
62 void addHbStatusRegs();
63 
64 } // namespace attn
65