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