1 #pragma once
2 
3 #include <attn/attn_config.hpp>
4 
5 namespace attn
6 {
7 
8 /** @brief Attention handler return codes */
9 enum ReturnCodes
10 {
11     RC_SUCCESS = 0,
12     RC_NOT_HANDLED,
13     RC_ANALYZER_ERROR,
14     RC_CFAM_ERROR
15 };
16 
17 /**
18  * @brief The main attention handler logic
19  *
20  * Check each processor for active attentions of type SBE Vital (vital),
21  * System Checkstop (checkstop) and Special Attention (special) and handle
22  * each as follows:
23  *
24  * checkstop: Call hardware error analyzer
25  * vital:     TBD
26  * special:   Determine if the special attention is a Breakpoint (BP),
27  *            Terminate Immediately (TI) or CoreCodeToSp (corecode). For each
28  *            special attention type, do the following:
29  *
30  *            BP:          Notify Cronus
31  *            TI:          Start host diagnostics mode systemd unit
32  *            Corecode:    TBD
33  *
34  * @param i_config pointer to attention handler configuration object
35  */
36 void attnHandler(Config* i_config);
37 
38 } // namespace attn
39