1 #pragma once
2 
3 namespace openpower
4 {
5 namespace pels
6 {
7 
8 /**
9  * @brief Useful component IDs
10  */
11 enum class ComponentID
12 {
13     phosphorLogging = 0x2000
14 };
15 
16 /**
17  * @brief PEL section IDs
18  */
19 enum class SectionID
20 {
21     privateHeader = 0x5048,      // 'PH'
22     userHeader = 0x5548,         // 'UH'
23     primarySRC = 0x5053,         // 'PS'
24     secondarySRC = 0x5353,       // 'SS'
25     extendedUserHeader = 0x4548, // 'EH'
26     failingMTMS = 0x4D54,        // 'MT'
27     dumpLocation = 0x4448,       // 'DH'
28     firmwareError = 0x5357,      // 'SW'
29     impactedPart = 0x4C50,       // 'LP'
30     logicalResource = 0x4C52,    // 'LR'
31     hmcID = 0x484D,              // 'HM'
32     epow = 0x4550,               // 'EP'
33     ioEvent = 0x4945,            // 'IE'
34     mfgInfo = 0x4D49,            // 'MI'
35     callhome = 0x4348,           // 'CH'
36     userData = 0x5544,           // 'UD'
37     envInfo = 0x4549,            // 'EI'
38     extUserData = 0x4544         // 'ED'
39 };
40 
41 /**
42  * @brief Useful SRC types
43  */
44 enum class SRCType
45 {
46     bmcError = 0xBD,
47     powerError = 0x11,
48     hostbootError = 0xBC
49 };
50 
51 /**
52  * @brief Creator IDs
53  */
54 enum class CreatorID
55 {
56     fsp = 'E',
57     hmc = 'C',
58     hostboot = 'B',
59     ioDrawer = 'M',
60     occ = 'T',
61     openBMC = 'O',
62     partFW = 'L',
63     phyp = 'H',
64     powerControl = 'W',
65     powerNV = 'P',
66     sapphire = 'K',
67     slic = 'S',
68 };
69 
70 /**
71  * @brief Useful event scope values
72  */
73 enum class EventScope
74 {
75     entirePlatform = 0x03
76 };
77 
78 /**
79  * @brief Useful event type values
80  */
81 enum class EventType
82 {
83     notApplicable = 0x00,
84     miscInformational = 0x01,
85     tracing = 0x02
86 };
87 
88 /**
89  * @brief The major types of severity values, based on the
90  *        the left nibble of the severity value.
91  */
92 enum class SeverityType
93 {
94     nonError = 0x00,
95     recovered = 0x10,
96     predictive = 0x20,
97     unrecoverable = 0x40,
98     critical = 0x50,
99     diagnostic = 0x60,
100     symptom = 0x70
101 };
102 
103 /**
104  * @brief The Action Flags values with the bit
105  *        numbering needed by std::bitset.
106  *
107  * Not an enum class so that casting isn't needed
108  * by the bitset operations.
109  */
110 enum ActionFlagsBits
111 {
112     serviceActionFlagBit = 15,       // 0x8000
113     hiddenFlagBit = 14,              // 0x4000
114     reportFlagBit = 13,              // 0x2000
115     dontReportToHostFlagBit = 12,    // 0x1000
116     callHomeFlagBit = 11,            // 0x0800
117     isolationIncompleteFlagBit = 10, // 0x0400
118     spCallHomeFlagBit = 8,           // 0x0100
119     osSWErrorBit = 7,                // 0x0080
120     osHWErrorBit = 6,                // 0x0040
121     heartbeatCallHomeFlagBit = 5     // 0x0020
122 };
123 
124 /**
125  * @brief The PEL transmission states
126  */
127 enum class TransmissionState
128 {
129     newPEL = 0,
130     badPEL = 1,
131     sent = 2,
132     acked = 3
133 };
134 
135 /**
136  * @brief Callout priority values
137  */
138 enum class CalloutPriority
139 {
140     high = 'H',
141     medium = 'M',
142     mediumGroupA = 'A',
143     mediumGroupB = 'B',
144     mediumGroupC = 'C',
145     low = 'L'
146 };
147 
148 } // namespace pels
149 } // namespace openpower
150