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