blob: 2a0cfc171c5919c0dfc82b83368997c8ffcc8a77 [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;
10constexpr uint32_t CHECKSTOP_ATTN = 0x40000000;
11constexpr uint32_t SPECIAL_ATTN = 0x20000000;
12constexpr uint32_t RECOVERABLE_ATTN = 0x10000000;
Ben Tynerfb190542020-11-06 09:27:56 -060013
Ben Tyneref320152020-01-09 10:31:23 -060014/**
15 * @brief The main attention handler logic
16 *
17 * Check each processor for active attentions of type SBE Vital (vital),
Ben Tyner7a0dd542021-02-12 09:33:44 -060018 * System Checkstop (checkstop) and Special Attention (special) and handle
19 * each as follows:
Ben Tyneref320152020-01-09 10:31:23 -060020 *
Ben Tyner3fb52e52020-03-31 10:10:07 -050021 * checkstop: Call hardware error analyzer
Ben Tyneref320152020-01-09 10:31:23 -060022 * vital: TBD
23 * special: Determine if the special attention is a Breakpoint (BP),
Ben Tyner7a0dd542021-02-12 09:33:44 -060024 * Terminate Immediately (TI) or CoreCodeToSp (corecode). For each
25 * special attention type, do the following:
Ben Tyneref320152020-01-09 10:31:23 -060026 *
27 * BP: Notify Cronus
Ben Tyner3fb52e52020-03-31 10:10:07 -050028 * TI: Start host diagnostics mode systemd unit
Ben Tyneref320152020-01-09 10:31:23 -060029 * Corecode: TBD
Ben Tyner970fd4f2020-02-19 13:46:42 -060030 *
Ben Tyner3fb52e52020-03-31 10:10:07 -050031 * @param i_config pointer to attention handler configuration object
Ben Tyneref320152020-01-09 10:31:23 -060032 */
Ben Tyner3fb52e52020-03-31 10:10:07 -050033void attnHandler(Config* i_config);
Ben Tyner73ac3682020-01-09 10:46:47 -060034
35} // namespace attn