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 | dbeaf79 | 2020-05-14 08:27:18 -0500 | [diff] [blame] | 8 | /** @brief Attention handler return codes */ |
| 9 | enum ReturnCodes |
| 10 | { |
| 11 | RC_SUCCESS = 0, |
| 12 | RC_NOT_HANDLED, |
| 13 | RC_ANALYZER_ERROR, |
| 14 | RC_CFAM_ERROR |
| 15 | }; |
| 16 | |
Ben Tyner | ef32015 | 2020-01-09 10:31:23 -0600 | [diff] [blame] | 17 | /** |
| 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 Tyner | 3fb52e5 | 2020-03-31 10:10:07 -0500 | [diff] [blame] | 24 | * checkstop: Call hardware error analyzer |
Ben Tyner | ef32015 | 2020-01-09 10:31:23 -0600 | [diff] [blame] | 25 | * 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 Tyner | 3fb52e5 | 2020-03-31 10:10:07 -0500 | [diff] [blame] | 31 | * TI: Start host diagnostics mode systemd unit |
Ben Tyner | ef32015 | 2020-01-09 10:31:23 -0600 | [diff] [blame] | 32 | * Corecode: TBD |
Ben Tyner | 970fd4f | 2020-02-19 13:46:42 -0600 | [diff] [blame] | 33 | * |
Ben Tyner | 3fb52e5 | 2020-03-31 10:10:07 -0500 | [diff] [blame] | 34 | * @param i_config pointer to attention handler configuration object |
Ben Tyner | ef32015 | 2020-01-09 10:31:23 -0600 | [diff] [blame] | 35 | */ |
Ben Tyner | 3fb52e5 | 2020-03-31 10:10:07 -0500 | [diff] [blame] | 36 | void attnHandler(Config* i_config); |
Ben Tyner | 73ac368 | 2020-01-09 10:46:47 -0600 | [diff] [blame] | 37 | |
| 38 | } // namespace attn |