blob: 6099135e042bb348b08c072f67d7783f76bf3151 [file] [log] [blame]
Ben Tyneref320152020-01-09 10:31:23 -06001#pragma once
2
Ben Tyner3fb52e52020-03-31 10:10:07 -05003#include <attn/attn_config.hpp>
4
Ben Tyner73ac3682020-01-09 10:46:47 -06005namespace attn
6{
7
Ben Tynerfb190542020-11-06 09:27:56 -06008/** @brief Attention global status bits */
Ben Tyner135793a2021-10-27 09:18:41 -05009constexpr uint32_t SBE_ATTN = 0x00000002;
Ben Tyner6a69e6e2022-04-05 23:18:29 -050010constexpr uint32_t ANY_ATTN = 0x80000000;
Ben Tyner135793a2021-10-27 09:18:41 -050011constexpr uint32_t CHECKSTOP_ATTN = 0x40000000;
12constexpr uint32_t SPECIAL_ATTN = 0x20000000;
13constexpr uint32_t RECOVERABLE_ATTN = 0x10000000;
Ben Tynerfb190542020-11-06 09:27:56 -060014
Ben Tyneref320152020-01-09 10:31:23 -060015/**
16 * @brief The main attention handler logic
17 *
18 * Check each processor for active attentions of type SBE Vital (vital),
Ben Tyner7a0dd542021-02-12 09:33:44 -060019 * System Checkstop (checkstop) and Special Attention (special) and handle
20 * each as follows:
Ben Tyneref320152020-01-09 10:31:23 -060021 *
Ben Tyner3fb52e52020-03-31 10:10:07 -050022 * checkstop: Call hardware error analyzer
Ben Tyneref320152020-01-09 10:31:23 -060023 * vital: TBD
24 * special: Determine if the special attention is a Breakpoint (BP),
Ben Tyner7a0dd542021-02-12 09:33:44 -060025 * Terminate Immediately (TI) or CoreCodeToSp (corecode). For each
26 * special attention type, do the following:
Ben Tyneref320152020-01-09 10:31:23 -060027 *
28 * BP: Notify Cronus
Ben Tyner3fb52e52020-03-31 10:10:07 -050029 * TI: Start host diagnostics mode systemd unit
Ben Tyneref320152020-01-09 10:31:23 -060030 * Corecode: TBD
Ben Tyner970fd4f2020-02-19 13:46:42 -060031 *
Ben Tyner3fb52e52020-03-31 10:10:07 -050032 * @param i_config pointer to attention handler configuration object
Ben Tyneref320152020-01-09 10:31:23 -060033 */
Ben Tyner3fb52e52020-03-31 10:10:07 -050034void attnHandler(Config* i_config);
Ben Tyner73ac3682020-01-09 10:46:47 -060035
36} // namespace attn