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