Ben Tyner | ef32015 | 2020-01-09 10:31:23 -0600 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Ben Tyner | 3fb52e5 | 2020-03-31 10:10:07 -0500 | [diff] [blame] | 3 | #include <attn/attn_config.hpp> |
| 4 | |
Ben Tyner | 73ac368 | 2020-01-09 10:46:47 -0600 | [diff] [blame] | 5 | namespace attn |
| 6 | { |
| 7 | |
Ben Tyner | fb19054 | 2020-11-06 09:27:56 -0600 | [diff] [blame] | 8 | /** @brief Attention global status bits */ |
Ben Tyner | 135793a | 2021-10-27 09:18:41 -0500 | [diff] [blame] | 9 | constexpr uint32_t SBE_ATTN = 0x00000002; |
Ben Tyner | 6a69e6e | 2022-04-05 23:18:29 -0500 | [diff] [blame] | 10 | constexpr uint32_t ANY_ATTN = 0x80000000; |
Ben Tyner | 135793a | 2021-10-27 09:18:41 -0500 | [diff] [blame] | 11 | constexpr uint32_t CHECKSTOP_ATTN = 0x40000000; |
| 12 | constexpr uint32_t SPECIAL_ATTN = 0x20000000; |
| 13 | constexpr uint32_t RECOVERABLE_ATTN = 0x10000000; |
Ben Tyner | fb19054 | 2020-11-06 09:27:56 -0600 | [diff] [blame] | 14 | |
Ben Tyner | ef32015 | 2020-01-09 10:31:23 -0600 | [diff] [blame] | 15 | /** |
| 16 | * @brief The main attention handler logic |
| 17 | * |
| 18 | * Check each processor for active attentions of type SBE Vital (vital), |
Ben Tyner | 7a0dd54 | 2021-02-12 09:33:44 -0600 | [diff] [blame] | 19 | * System Checkstop (checkstop) and Special Attention (special) and handle |
| 20 | * each as follows: |
Ben Tyner | ef32015 | 2020-01-09 10:31:23 -0600 | [diff] [blame] | 21 | * |
Ben Tyner | 3fb52e5 | 2020-03-31 10:10:07 -0500 | [diff] [blame] | 22 | * checkstop: Call hardware error analyzer |
Ben Tyner | ef32015 | 2020-01-09 10:31:23 -0600 | [diff] [blame] | 23 | * vital: TBD |
| 24 | * special: Determine if the special attention is a Breakpoint (BP), |
Ben Tyner | 7a0dd54 | 2021-02-12 09:33:44 -0600 | [diff] [blame] | 25 | * Terminate Immediately (TI) or CoreCodeToSp (corecode). For each |
| 26 | * special attention type, do the following: |
Ben Tyner | ef32015 | 2020-01-09 10:31:23 -0600 | [diff] [blame] | 27 | * |
| 28 | * BP: Notify Cronus |
Ben Tyner | 3fb52e5 | 2020-03-31 10:10:07 -0500 | [diff] [blame] | 29 | * TI: Start host diagnostics mode systemd unit |
Ben Tyner | ef32015 | 2020-01-09 10:31:23 -0600 | [diff] [blame] | 30 | * Corecode: TBD |
Ben Tyner | 970fd4f | 2020-02-19 13:46:42 -0600 | [diff] [blame] | 31 | * |
Ben Tyner | 3fb52e5 | 2020-03-31 10:10:07 -0500 | [diff] [blame] | 32 | * @param i_config pointer to attention handler configuration object |
Ben Tyner | ef32015 | 2020-01-09 10:31:23 -0600 | [diff] [blame] | 33 | */ |
Ben Tyner | 3fb52e5 | 2020-03-31 10:10:07 -0500 | [diff] [blame] | 34 | void attnHandler(Config* i_config); |
Ben Tyner | 73ac368 | 2020-01-09 10:46:47 -0600 | [diff] [blame] | 35 | |
| 36 | } // namespace attn |