Ben Tyner | b1ebfcb | 2020-05-08 18:52:48 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Ben Tyner | 1b1915e | 2020-10-23 15:13:38 -0500 | [diff] [blame] | 3 | #include <util/ffdc_file.hpp> |
| 4 | |
Ben Tyner | b1ebfcb | 2020-05-08 18:52:48 -0500 | [diff] [blame] | 5 | #include <cstddef> // for size_t |
| 6 | #include <map> |
| 7 | #include <string> |
Ben Tyner | 1b1915e | 2020-10-23 15:13:38 -0500 | [diff] [blame] | 8 | #include <vector> |
Ben Tyner | b1ebfcb | 2020-05-08 18:52:48 -0500 | [diff] [blame] | 9 | |
| 10 | namespace attn |
| 11 | { |
| 12 | |
Ben Tyner | 188f109 | 2021-02-01 09:33:06 -0600 | [diff] [blame] | 13 | constexpr auto pathLogging = "/xyz/openbmc_project/logging"; |
| 14 | constexpr auto levelPelError = "xyz.openbmc_project.Logging.Entry.Level.Error"; |
| 15 | constexpr auto eventPelTerminate = "xyz.open_power.Attn.Error.Terminate"; |
| 16 | |
Ben Tyner | b1ebfcb | 2020-05-08 18:52:48 -0500 | [diff] [blame] | 17 | /** @brief Logging event types */ |
| 18 | enum class EventType |
| 19 | { |
| 20 | Checkstop = 0, |
| 21 | Terminate = 1, |
| 22 | Vital = 2, |
| 23 | HwDiagsFail = 3, |
Ben Tyner | b971517 | 2021-09-29 08:46:19 -0500 | [diff] [blame] | 24 | AttentionFail = 4, |
| 25 | PhalSbeChipop = 5 |
Ben Tyner | b1ebfcb | 2020-05-08 18:52:48 -0500 | [diff] [blame] | 26 | }; |
| 27 | |
Ben Tyner | f5210bb | 2021-01-05 12:58:10 -0600 | [diff] [blame] | 28 | /** @brief Commit special attention TI event to log */ |
| 29 | void eventTerminate(std::map<std::string, std::string> i_additionalData, |
| 30 | char* i_tiInfoData); |
Ben Tyner | b1ebfcb | 2020-05-08 18:52:48 -0500 | [diff] [blame] | 31 | |
Ben Tyner | 7f6ce6a | 2021-08-17 19:40:00 -0500 | [diff] [blame] | 32 | /** @brief Commit SBE vital event to log, returns event log Id */ |
| 33 | uint32_t eventVital(); |
Ben Tyner | b1ebfcb | 2020-05-08 18:52:48 -0500 | [diff] [blame] | 34 | |
Ben Tyner | f5210bb | 2021-01-05 12:58:10 -0600 | [diff] [blame] | 35 | /** @brief Commit attention handler failure event to log */ |
Ben Tyner | b1ebfcb | 2020-05-08 18:52:48 -0500 | [diff] [blame] | 36 | void eventAttentionFail(int i_error); |
| 37 | |
Ben Tyner | b1ebfcb | 2020-05-08 18:52:48 -0500 | [diff] [blame] | 38 | } // namespace attn |