blob: efbabf7efffbba34eb4b6f358814e0e3695abbc3 [file] [log] [blame]
Ben Tynerb1ebfcb2020-05-08 18:52:48 -05001#pragma once
2
Ben Tyner1b1915e2020-10-23 15:13:38 -05003#include <util/ffdc_file.hpp>
4
Ben Tynerb1ebfcb2020-05-08 18:52:48 -05005#include <cstddef> // for size_t
6#include <map>
7#include <string>
Ben Tyner1b1915e2020-10-23 15:13:38 -05008#include <vector>
Ben Tynerb1ebfcb2020-05-08 18:52:48 -05009
10namespace attn
11{
12
Ben Tyner188f1092021-02-01 09:33:06 -060013constexpr auto pathLogging = "/xyz/openbmc_project/logging";
14constexpr auto levelPelError = "xyz.openbmc_project.Logging.Entry.Level.Error";
15constexpr auto eventPelTerminate = "xyz.open_power.Attn.Error.Terminate";
16
Ben Tynerb1ebfcb2020-05-08 18:52:48 -050017/** @brief Logging event types */
18enum class EventType
19{
20 Checkstop = 0,
21 Terminate = 1,
22 Vital = 2,
23 HwDiagsFail = 3,
Ben Tynerb9715172021-09-29 08:46:19 -050024 AttentionFail = 4,
25 PhalSbeChipop = 5
Ben Tynerb1ebfcb2020-05-08 18:52:48 -050026};
27
Ben Tynerf5210bb2021-01-05 12:58:10 -060028/** @brief Commit special attention TI event to log */
29void eventTerminate(std::map<std::string, std::string> i_additionalData,
30 char* i_tiInfoData);
Ben Tynerb1ebfcb2020-05-08 18:52:48 -050031
Ben Tyner7f6ce6a2021-08-17 19:40:00 -050032/** @brief Commit SBE vital event to log, returns event log Id */
33uint32_t eventVital();
Ben Tynerb1ebfcb2020-05-08 18:52:48 -050034
Ben Tynerf5210bb2021-01-05 12:58:10 -060035/** @brief Commit attention handler failure event to log */
Ben Tynerb1ebfcb2020-05-08 18:52:48 -050036void eventAttentionFail(int i_error);
37
Ben Tynerb1ebfcb2020-05-08 18:52:48 -050038} // namespace attn