blob: dab9ea7233439e099d20128fd6dcdd68c7ffd85c [file] [log] [blame]
Ben Tynerf5210bb2021-01-05 12:58:10 -06001#pragma once
2
3#include <cstddef> // for size_t
4
5namespace attn
6{
7namespace pel
8{
9
10enum class SectionID
11{
Patrick Williams27dd6362023-05-10 07:51:20 -050012 privateHeader = 0x5048, // 'PH'
13 userHeader = 0x5548, // 'UH'
14 primarySRC = 0x5053, // 'PS'
Ben Tynerfeeea832021-04-06 10:08:11 -050015 extendedHeader = 0x4548, // 'EH'
Ben Tynerf5210bb2021-01-05 12:58:10 -060016};
17
18enum class ComponentID
19{
20 attentionHandler = 0xd100
21};
22
23enum class CreatorID
24{
Patrick Williams27dd6362023-05-10 07:51:20 -050025 hostboot = 'B',
Ben Tynerf5210bb2021-01-05 12:58:10 -060026 hypervisor = 'H',
Patrick Williams27dd6362023-05-10 07:51:20 -050027 openbmc = 'O'
Ben Tynerf5210bb2021-01-05 12:58:10 -060028};
29
30enum class SubsystemID
31{
32 hypervisor = 0x82,
Patrick Williams27dd6362023-05-10 07:51:20 -050033 hostboot = 0x8a,
34 openbmc = 0x8d
Ben Tynerf5210bb2021-01-05 12:58:10 -060035};
36
37enum class Severity
38{
39 information = 0x00,
40 termination = 0x51
41};
42
43enum class EventType
44{
Patrick Williams27dd6362023-05-10 07:51:20 -050045 na = 0x00,
Ben Tynerf5210bb2021-01-05 12:58:10 -060046 trace = 0x02
47};
48
49enum class ActionFlags
50{
51 service = 0x8000,
Patrick Williams27dd6362023-05-10 07:51:20 -050052 hidden = 0x4000,
53 report = 0x2000,
54 call = 0x0800
Ben Tynerf5210bb2021-01-05 12:58:10 -060055};
56
57inline ActionFlags operator|(ActionFlags a, ActionFlags b)
58{
59 return static_cast<ActionFlags>(static_cast<int>(a) | static_cast<int>(b));
60}
61
62enum class EventScope
63{
64 platform = 0x03
65};
66
67constexpr size_t numSrcWords = 8; // number of SRC hex words
68const size_t asciiStringSize = 32; // size of SRC ascii string
Patrick Williams27dd6362023-05-10 07:51:20 -050069const size_t mtmsSize = 20; // size of an mtms field
Ben Tynerf5210bb2021-01-05 12:58:10 -060070
71} // namespace pel
72} // namespace attn