blob: 1500d39d76f77fa404e7bdc8c90c7d4158f63869 [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 Tynerdbeaf792020-05-14 08:27:18 -05008/** @brief Attention handler return codes */
9enum ReturnCodes
10{
11 RC_SUCCESS = 0,
12 RC_NOT_HANDLED,
13 RC_ANALYZER_ERROR,
14 RC_CFAM_ERROR
15};
16
Ben Tyneref320152020-01-09 10:31:23 -060017/**
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 *
Ben Tyner3fb52e52020-03-31 10:10:07 -050024 * checkstop: Call hardware error analyzer
Ben Tyneref320152020-01-09 10:31:23 -060025 * 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
Ben Tyner3fb52e52020-03-31 10:10:07 -050031 * TI: Start host diagnostics mode systemd unit
Ben Tyneref320152020-01-09 10:31:23 -060032 * Corecode: TBD
Ben Tyner970fd4f2020-02-19 13:46:42 -060033 *
Ben Tyner3fb52e52020-03-31 10:10:07 -050034 * @param i_config pointer to attention handler configuration object
Ben Tyneref320152020-01-09 10:31:23 -060035 */
Ben Tyner3fb52e52020-03-31 10:10:07 -050036void attnHandler(Config* i_config);
Ben Tyner73ac3682020-01-09 10:46:47 -060037
38} // namespace attn