blob: 41ed4092ae231dacd7baf7bb1edb296a6dda24b0 [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 */
9constexpr uint32_t SBE_ATTN = 0x00000002;
10constexpr uint32_t CHECKSTOP_ATTN = 0x40000000;
11constexpr uint32_t SPECIAL_ATTN = 0x20000000;
12
Ben Tynerb24b2202021-02-08 09:06:10 -060013// Need to add defaultOpalTiInfo with SRC BB821410 (ascii)
14
15constexpr uint8_t defaultPhypTiInfo[0x58] = {
16 0x01, 0xa1, 0x02, 0xa8, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,
17 0x09, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
18 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
19 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
20 0x00, 0x00, 0x00, 0x00, 0x42, 0x37, 0x30, 0x30, 0x46, 0x46, 0x46,
21 0x46, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
22 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
23 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
24
Ben Tyner4bbcb382021-02-22 09:29:00 -060025constexpr uint8_t defaultHbTiInfo[0x58] = {
26 0x01, 0xa1, 0x02, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
27 0x09, 0x01, 0x00, 0x00, 0x00, 0xbc, 0x80, 0x1b, 0x99, 0x00, 0x00,
28 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
29 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
30 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
34
Ben Tyneref320152020-01-09 10:31:23 -060035/**
36 * @brief The main attention handler logic
37 *
38 * Check each processor for active attentions of type SBE Vital (vital),
Ben Tyner7a0dd542021-02-12 09:33:44 -060039 * System Checkstop (checkstop) and Special Attention (special) and handle
40 * each as follows:
Ben Tyneref320152020-01-09 10:31:23 -060041 *
Ben Tyner3fb52e52020-03-31 10:10:07 -050042 * checkstop: Call hardware error analyzer
Ben Tyneref320152020-01-09 10:31:23 -060043 * vital: TBD
44 * special: Determine if the special attention is a Breakpoint (BP),
Ben Tyner7a0dd542021-02-12 09:33:44 -060045 * Terminate Immediately (TI) or CoreCodeToSp (corecode). For each
46 * special attention type, do the following:
Ben Tyneref320152020-01-09 10:31:23 -060047 *
48 * BP: Notify Cronus
Ben Tyner3fb52e52020-03-31 10:10:07 -050049 * TI: Start host diagnostics mode systemd unit
Ben Tyneref320152020-01-09 10:31:23 -060050 * Corecode: TBD
Ben Tyner970fd4f2020-02-19 13:46:42 -060051 *
Ben Tyner3fb52e52020-03-31 10:10:07 -050052 * @param i_config pointer to attention handler configuration object
Ben Tyneref320152020-01-09 10:31:23 -060053 */
Ben Tyner3fb52e52020-03-31 10:10:07 -050054void attnHandler(Config* i_config);
Ben Tyner73ac3682020-01-09 10:46:47 -060055
56} // namespace attn