blob: d0f3e15792776913220f7502ffcdc62443837390 [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{
12 privateHeader = 0x5048, // 'PH'
13 userHeader = 0x5548, // 'UH'
14 primarySRC = 0x5053, // 'PS'
15};
16
17enum class ComponentID
18{
19 attentionHandler = 0xd100
20};
21
22enum class CreatorID
23{
24 hostboot = 'B',
25 hypervisor = 'H',
26 openbmc = 'O'
27};
28
29enum class SubsystemID
30{
31 hypervisor = 0x82,
32 hostboot = 0x8a,
33 openbmc = 0x8d
34};
35
36enum class Severity
37{
38 information = 0x00,
39 termination = 0x51
40};
41
42enum class EventType
43{
44 na = 0x00,
45 trace = 0x02
46};
47
48enum class ActionFlags
49{
50 service = 0x8000,
51 report = 0x2000,
52 call = 0x0800
53};
54
55inline ActionFlags operator|(ActionFlags a, ActionFlags b)
56{
57 return static_cast<ActionFlags>(static_cast<int>(a) | static_cast<int>(b));
58}
59
60enum class EventScope
61{
62 platform = 0x03
63};
64
65constexpr size_t numSrcWords = 8; // number of SRC hex words
66const size_t asciiStringSize = 32; // size of SRC ascii string
67
68} // namespace pel
69} // namespace attn