1 #pragma once
2 
3 #include <util/ffdc_file.hpp>
4 
5 #include <cstddef> // for size_t
6 #include <map>
7 #include <string>
8 #include <vector>
9 
10 namespace attn
11 {
12 constexpr auto pathLogging = "/xyz/openbmc_project/logging";
13 constexpr auto levelPelError = "xyz.openbmc_project.Logging.Entry.Level.Error";
14 constexpr auto levelPelInfo =
15     "xyz.openbmc_project.Logging.Entry.Level.Informational";
16 constexpr auto eventPelTerminate = "xyz.open_power.Attn.Error.Terminate";
17 
18 /** @brief Logging event types */
19 enum class EventType
20 {
21     Checkstop = 0,
22     Terminate = 1,
23     Vital = 2,
24     HwDiagsFail = 3,
25     AttentionFail = 4,
26     PhalSbeChipop = 5
27 };
28 
29 /** @brief Commit special attention TI event to log */
30 void eventTerminate(std::map<std::string, std::string> i_additionalData,
31                     char* i_tiInfoData);
32 
33 /** @brief Commit SBE vital event to log
34  *
35  *  @param[in] severity - the PEL severity level of the event
36  *
37  *  @return platform event log (PEL) ID
38  * */
39 uint32_t eventVital(std::string severity);
40 
41 /** @brief Commit attention handler failure event to log */
42 void eventAttentionFail(int i_error);
43 
44 } // namespace attn
45