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