blob: ae886eb8edb2ed5c893112539ab3c5294d2acd66 [file] [log] [blame]
Matt Spinler1a94cc32019-09-11 13:32:12 -05001#pragma once
2
3namespace openpower
4{
5namespace pels
6{
7
Matt Spinler289aa472019-09-20 12:33:29 -05008/**
9 * @brief Useful component IDs
10 */
Matt Spinler09d64002019-09-11 14:29:46 -050011enum class ComponentID
12{
13 phosphorLogging = 0x2000
14};
15
Matt Spinler1a94cc32019-09-11 13:32:12 -050016/**
17 * @brief PEL section IDs
18 */
19enum 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
Matt Spinler289aa472019-09-20 12:33:29 -050041/**
42 * @brief Useful SRC types
43 */
Matt Spinler93e29322019-09-20 11:16:15 -050044enum class SRCType
45{
46 bmcError = 0xBD,
47 powerError = 0x11
48};
49
Matt Spinler289aa472019-09-20 12:33:29 -050050/**
51 * @brief Creator IDs
52 */
53enum class CreatorID
54{
55 fsp = 'E',
56 hmc = 'C',
57 hostboot = 'B',
58 ioDrawer = 'M',
59 occ = 'T',
60 openBMC = 'O',
61 partFW = 'L',
62 phyp = 'H',
63 powerControl = 'W',
64 powerNV = 'P',
65 sapphire = 'K',
66 slic = 'S',
67};
68
Matt Spinlerfdb6a202019-09-20 14:09:20 -050069/**
70 * @brief Useful event scope values
71 */
72enum class EventScope
73{
74 entirePlatform = 0x03
75};
76
77/**
78 * @brief Useful event type values
79 */
80enum class EventType
81{
Matt Spinlerf1e85e22019-11-01 11:31:31 -050082 notApplicable = 0x00,
83 miscInformational = 0x01,
84 tracing = 0x02
Matt Spinlerfdb6a202019-09-20 14:09:20 -050085};
86
Matt Spinlera7525aa2019-11-01 11:11:07 -050087/**
88 * @brief The major types of severity values, based on the
89 * the left nibble of the severity value.
90 */
91enum class SeverityType
92{
93 nonError = 0x00,
94 recovered = 0x10,
95 predictive = 0x20,
96 unrecoverable = 0x40,
97 critical = 0x50,
98 diagnostic = 0x60,
99 symptom = 0x70
100};
101
Matt Spinlerf1e85e22019-11-01 11:31:31 -0500102/**
103 * @brief The Action Flags values with the bit
104 * numbering needed by std::bitset.
105 *
106 * Not an enum class so that casting isn't needed
107 * by the bitset operations.
108 */
109enum ActionFlagsBits
110{
111 serviceActionFlagBit = 15, // 0x8000
112 hiddenFlagBit = 14, // 0x4000
113 reportFlagBit = 13, // 0x2000
114 dontReportToHostFlagBit = 12, // 0x1000
115 callHomeFlagBit = 11, // 0x0800
116 isolationIncompleteFlagBit = 10, // 0x0400
117 spCallHomeFlagBit = 8, // 0x0100
118 osSWErrorBit = 7, // 0x0080
119 osHWErrorBit = 6 // 0x0040
120};
121
Matt Spinler1a94cc32019-09-11 13:32:12 -0500122} // namespace pels
123} // namespace openpower