xref: /openbmc/phosphor-logging/extensions/openpower-pels/registry/README.md (revision 23970b0d7eb893ed76082100a63e40feec2da648)
1a96a7948SMatt Spinler# Platform Event Log Message Registry
2a96a7948SMatt SpinlerOn the BMC, PELs are created from the standard event logs provided by
3a96a7948SMatt Spinlerphosphor-logging using a message registry that provides the PEL related fields.
4a96a7948SMatt SpinlerThe message registry is a JSON file.
5a96a7948SMatt Spinler
6a96a7948SMatt Spinler## Contents
7a96a7948SMatt Spinler* [Component IDs](#component-ids)
8a96a7948SMatt Spinler* [Message Registry](#message-registry-fields)
9d03d3d91SMatt Spinler* [Modifying and Testing](#modifying-and-testing)
10a96a7948SMatt Spinler
11a96a7948SMatt Spinler## Component IDs
12a96a7948SMatt SpinlerA component ID is a 2 byte value of the form 0xYY00 used in a PEL to:
13a96a7948SMatt Spinler1. Provide the upper byte (the YY from above) of an SRC reason code in `BD`
14a96a7948SMatt Spinler   SRCs.
15a96a7948SMatt Spinler2. Reside in the section header of the Private Header PEL section to specify
16a96a7948SMatt Spinler   the error log creator's component ID.
17a96a7948SMatt Spinler3. Reside in the section header of the User Header section to specify the error
18a96a7948SMatt Spinler   log committer's component ID.
19a96a7948SMatt Spinler4. Reside in the section header in the User Data section to specify which
20a96a7948SMatt Spinler   parser to call to parse that section.
21a96a7948SMatt Spinler
22a96a7948SMatt SpinlerComponent IDs are specified in the message registry either as the upper byte of
23a96a7948SMatt Spinlerthe SRC reason code field for `BD` SRCs, or in the standalone `ComponentID`
24a96a7948SMatt Spinlerfield.
25a96a7948SMatt Spinler
26a96a7948SMatt SpinlerComponent IDs will be unique on a per-repository basis for errors unique to
27a96a7948SMatt Spinlerthat repository.  When the same errors are created by multiple repositories,
28a96a7948SMatt Spinlerthose errors will all share the same component ID.  The master list of
29a96a7948SMatt Spinlercomponent IDs is [here](ComponentIDs.md).
30a96a7948SMatt Spinler
31a96a7948SMatt Spinler## Message Registry Fields
32a96a7948SMatt SpinlerThe message registry schema is [here](schema/schema.json), and the message
33a96a7948SMatt Spinlerregistry itself is [here](message_registry.json).  The schema will be validated
34a96a7948SMatt Spinlereither during a bitbake build or during CI, or eventually possibly both.
35a96a7948SMatt Spinler
36a96a7948SMatt SpinlerIn the message registry, there are fields for specifying:
37a96a7948SMatt Spinler
38a96a7948SMatt Spinler### Name
39a96a7948SMatt SpinlerThis is the key into the message registry, and is the Message property
40a96a7948SMatt Spinlerof the OpenBMC event log that the PEL is being created from.
41a96a7948SMatt Spinler
42a96a7948SMatt Spinler```
43a96a7948SMatt Spinler"Name": "xyz.openbmc_project.Power.Fault"
44a96a7948SMatt Spinler```
45a96a7948SMatt Spinler
46a96a7948SMatt Spinler### Subsystem
47a96a7948SMatt SpinlerThis field is part of the PEL User Header section, and is used to specify
48a96a7948SMatt Spinlerthe subsystem pertaining to the error.  It is an enumeration that maps to the
49*23970b0dSMatt Spinleractual PEL value.  If the subsystem isn't known ahead of time, it can be passed
50*23970b0dSMatt Spinlerin at the time of PEL creation using the 'PEL\_SUBSYSTEM' AdditionalData field.
51*23970b0dSMatt SpinlerIn this case, 'Subsystem' isn't required, though 'PossibleSubsystems' is.
52a96a7948SMatt Spinler
53a96a7948SMatt Spinler```
54a96a7948SMatt Spinler"Subsystem": "power_supply"
55a96a7948SMatt Spinler```
56a96a7948SMatt Spinler
57*23970b0dSMatt Spinler### PossibleSubsystems
58*23970b0dSMatt SpinlerThis field is used by scripts that build documentation from the message
59*23970b0dSMatt Spinlerregistry to know which subsystems are possible for an error when it can't be
60*23970b0dSMatt Spinlerhardcoded using the 'Subsystem' field.  It is mutually exclusive with the
61*23970b0dSMatt Spinler'Subsystem' field.
62*23970b0dSMatt Spinler
63*23970b0dSMatt Spinler```
64*23970b0dSMatt Spinler"PossibleSubsystems": ["memory", "processor"]
65*23970b0dSMatt Spinler```
66*23970b0dSMatt Spinler
67a96a7948SMatt Spinler### Severity
68a96a7948SMatt SpinlerThis field is part of the PEL User Header section, and is used to specify
69a96a7948SMatt Spinlerthe PEL severity.  It is an optional field, if it isn't specified, then the
70a96a7948SMatt Spinlerseverity of the OpenBMC event log will be converted into a PEL severity value.
71a96a7948SMatt Spinler
7217952d94SMatt SpinlerIt can either be the plain severity value, or an array of severity values that
7317952d94SMatt Spinlerare based on system type, where an entry without a system type will match
7417952d94SMatt Spinleranything unless another entry has a matching system type.
7517952d94SMatt Spinler
76a96a7948SMatt Spinler```
77a96a7948SMatt Spinler"Severity": "unrecoverable"
78a96a7948SMatt Spinler```
79a96a7948SMatt Spinler
8017952d94SMatt Spinler```
8117952d94SMatt SpinlerSeverity":
8217952d94SMatt Spinler[
8317952d94SMatt Spinler    {
8417952d94SMatt Spinler        "System": "system1",
8517952d94SMatt Spinler        "SevValue": "recovered"
8617952d94SMatt Spinler    },
8717952d94SMatt Spinler    {
8817952d94SMatt Spinler        "Severity": "unrecoverable"
8917952d94SMatt Spinler    }
9017952d94SMatt Spinler]
9117952d94SMatt Spinler```
9217952d94SMatt SpinlerThe above example shows that on system 'system1' the severity will be
9317952d94SMatt Spinlerrecovered, and on every other system it will be unrecoverable.
9417952d94SMatt Spinler
95a96a7948SMatt Spinler### Mfg Severity
96a96a7948SMatt SpinlerThis is an optional field and is used to override the Severity field when a
9717952d94SMatt Spinlerspecific manufacturing isolation mode is enabled.  It has the same format as
9817952d94SMatt SpinlerSeverity.
99a96a7948SMatt Spinler
100a96a7948SMatt Spinler```
101a96a7948SMatt Spinler"MfgSeverity": "unrecoverable"
102a96a7948SMatt Spinler```
103a96a7948SMatt Spinler
104a96a7948SMatt Spinler### Event Scope
105a96a7948SMatt SpinlerThis field is part of the PEL User Header section, and is used to specify
106a96a7948SMatt Spinlerthe event scope, as defined by the PEL spec.  It is optional and defaults to
107a96a7948SMatt Spinler"entire platform".
108a96a7948SMatt Spinler
109a96a7948SMatt Spinler```
110a96a7948SMatt Spinler"EventScope": "entire_platform"
111a96a7948SMatt Spinler```
112a96a7948SMatt Spinler
113a96a7948SMatt Spinler### Event Type
114a96a7948SMatt SpinlerThis field is part of the PEL User Header section, and is used to specify
115a96a7948SMatt Spinlerthe event type, as defined by the PEL spec.  It is optional and defaults to
1163fb208e3SMatt Spinler"not applicable" for non-informational logs, and "misc_information_only" for
1173fb208e3SMatt Spinlerinformational ones.
118a96a7948SMatt Spinler
119a96a7948SMatt Spinler```
120a96a7948SMatt Spinler"EventType": "na"
121a96a7948SMatt Spinler```
122a96a7948SMatt Spinler
123a96a7948SMatt Spinler### Action Flags
124a96a7948SMatt SpinlerThis field is part of the PEL User Header section, and is used to specify the
125a96a7948SMatt SpinlerPEL action flags, as defined by the PEL spec.  It is an array of enumerations.
126a96a7948SMatt Spinler
1273fb208e3SMatt SpinlerThe action flags can usually be deduced from other PEL fields, such as the
1283fb208e3SMatt Spinlerseverity or if there are any callouts.  As such, this is an optional field and
1293fb208e3SMatt Spinlerif not supplied the code will fill them in based on those fields.
1303fb208e3SMatt Spinler
1313fb208e3SMatt SpinlerIn fact, even if supplied here, the code may still modify them to ensure they
13278feef04SMatt Spinlerare correct.  The rules used for this are
13378feef04SMatt Spinler[here](../README.md#action-flags-and-event-type-rules).
1343fb208e3SMatt Spinler
135a96a7948SMatt Spinler```
136a96a7948SMatt Spinler"ActionFlags": ["service_action", "report", "call_home"]
137a96a7948SMatt Spinler```
138a96a7948SMatt Spinler
139a96a7948SMatt Spinler### Mfg Action Flags
140a96a7948SMatt SpinlerThis is an optional field and is used to override the Action Flags field when a
141a96a7948SMatt Spinlerspecific manufacturing isolation mode is enabled.
142a96a7948SMatt Spinler
143a96a7948SMatt Spinler```
144a96a7948SMatt Spinler"MfgActionFlags": ["service_action", "report", "call_home"]
145a96a7948SMatt Spinler```
146a96a7948SMatt Spinler
147a96a7948SMatt Spinler### Component ID
148a96a7948SMatt SpinlerThis is the component ID of the PEL creator, in the form 0xYY00.  For `BD`
149a96a7948SMatt SpinlerSRCs, this is an optional field and if not present the value will be taken from
150a96a7948SMatt Spinlerthe upper byte of the reason code.  If present for `BD` SRCs, then this byte
151a96a7948SMatt Spinlermust match the upper byte of the reason code.
152a96a7948SMatt Spinler
153a96a7948SMatt Spinler```
154a96a7948SMatt Spinler"ComponentID": "0x5500"
155a96a7948SMatt Spinler```
156a96a7948SMatt Spinler
157a96a7948SMatt Spinler### SRC Type
158a96a7948SMatt SpinlerThis specifies the type of SRC to create.  The type is the first 2 characters
159a96a7948SMatt Spinlerof the 8 character ASCII string field of the PEL.  The allowed types are `BD`,
160a96a7948SMatt Spinlerfor the standard OpenBMC error, and `11`, for power related errors.  It is
161a96a7948SMatt Spinleroptional and if not specified will default to `BD`.
162a96a7948SMatt Spinler
163a96a7948SMatt SpinlerNote: The ASCII string for BD SRCs looks like: `BDBBCCCC`, where:
164a96a7948SMatt Spinler* BD = SRC type
165a96a7948SMatt Spinler* BB = PEL subsystem as mentioned above
166a96a7948SMatt Spinler* CCCC SRC reason code
167a96a7948SMatt Spinler
168a96a7948SMatt SpinlerFor `11` SRCs, it looks like: `1100RRRR`, where RRRR is the SRC reason code.
169a96a7948SMatt Spinler
170a96a7948SMatt Spinler```
171a96a7948SMatt Spinler"Type": "11"
172a96a7948SMatt Spinler```
173a96a7948SMatt Spinler
174a96a7948SMatt Spinler### SRC Reason Code
175a96a7948SMatt SpinlerThis is the 4 character value in the latter half of the SRC ASCII string.  It
176a96a7948SMatt Spinleris treated as a 2 byte hex value, such as 0x5678.  For `BD` SRCs, the first
177a96a7948SMatt Spinlerbyte is the same as the first byte of the component ID field in the Private
178a96a7948SMatt SpinlerHeader section that represents the creator's component ID.
179a96a7948SMatt Spinler
180a96a7948SMatt Spinler```
181a96a7948SMatt Spinler"ReasonCode": "0x5544"
182a96a7948SMatt Spinler```
183a96a7948SMatt Spinler
184a96a7948SMatt Spinler### SRC Symptom ID Fields
185a96a7948SMatt SpinlerThe symptom ID is in the Extended User Header section and is defined in the PEL
186a96a7948SMatt Spinlerspec as the unique event signature string.  It always starts with the ASCII
187a96a7948SMatt Spinlerstring.  This field in the message registry allows one to choose which SRC words
188a96a7948SMatt Spinlerto use in addition to the ASCII string field to form the symptom ID. All words
189a96a7948SMatt Spinlerare separated by underscores.  If not specified, the code will choose a default
190a96a7948SMatt Spinlerformat, which may depend on the SRC type.
191a96a7948SMatt Spinler
192a96a7948SMatt SpinlerFor example: ["SRCWord3", "SRCWord9"] would be:
193a96a7948SMatt Spinler`<ASCII_STRING>_<SRCWord3>_<SRCWord9>`, which could look like:
194a96a7948SMatt Spinler`B181320_00000050_49000000`.
195a96a7948SMatt Spinler
196a96a7948SMatt Spinler```
197a96a7948SMatt Spinler"SymptomIDFields": ["SRCWord3", "SRCWord9"]
198a96a7948SMatt Spinler```
199a96a7948SMatt Spinler
200a96a7948SMatt Spinler### SRC words 6 to 9
201a96a7948SMatt SpinlerIn a PEL, these SRC words are free format and can be filled in by the user as
202a96a7948SMatt Spinlerdesired.  On the BMC, the source of these words is the AdditionalData fields in
203a96a7948SMatt Spinlerthe event log.  The message registry provides a way for the log creator to
204a96a7948SMatt Spinlerspecify which AdditionalData property field to get the data from, and also to
205a96a7948SMatt Spinlerdefine what the SRC word means for use by parsers.  If not specified, these SRC
206a96a7948SMatt Spinlerwords will be set to zero in the PEL.
207a96a7948SMatt Spinler
208a96a7948SMatt Spinler```
209a96a7948SMatt Spinler"Words6to9":
210a96a7948SMatt Spinler{
211a96a7948SMatt Spinler    "6":
212a96a7948SMatt Spinler    {
213a96a7948SMatt Spinler        "description": "Failing unit number",
214a96a7948SMatt Spinler        "AdditionalDataPropSource": "PS_NUM"
215a96a7948SMatt Spinler    }
216a96a7948SMatt Spinler}
217a96a7948SMatt Spinler```
218a96a7948SMatt Spinler
219a96a7948SMatt Spinler### SRC Power Fault flag
220a96a7948SMatt SpinlerThe SRC has a bit in it to indicate if the error is a power fault.  This is an
221a96a7948SMatt Spinleroptional field in the message registry and defaults to false.
222a96a7948SMatt Spinler
223a96a7948SMatt Spinler```
224a96a7948SMatt Spinler"PowerFault: false
225a96a7948SMatt Spinler```
226a96a7948SMatt Spinler
227a96a7948SMatt Spinler### Documentation Fields
228a96a7948SMatt SpinlerThe documentation fields are used by PEL parsers to display a human readable
229a96a7948SMatt Spinlerdescription of a PEL.  They are also the source for the Redfish event log
230a96a7948SMatt Spinlermessages.
231a96a7948SMatt Spinler
232a96a7948SMatt Spinler#### Message
233a96a7948SMatt SpinlerThis field is used by the BMC's PEL parser as the description of the error log.
234a96a7948SMatt SpinlerIt will also be used in Redfish event logs.  It supports argument substitution
235a96a7948SMatt Spinlerusing the %1, %2, etc placeholders allowing any of the SRC user data words 6 -
236a96a7948SMatt Spinler9 to be displayed as part of the message.  If the placeholders are used, then
237a96a7948SMatt Spinlerthe `MessageArgSources` property must be present to say which SRC words to use
238a96a7948SMatt Spinlerfor each placeholder.
239a96a7948SMatt Spinler
240a96a7948SMatt Spinler```
241a96a7948SMatt Spinler"Message": "Processor %1 had %2 errors"
242a96a7948SMatt Spinler```
243a96a7948SMatt Spinler
244a96a7948SMatt Spinler#### MessageArgSources
245a96a7948SMatt SpinlerThis optional field is required when the Message field contains the %X
246a96a7948SMatt Spinlerplaceholder arguments. It is an array that says which SRC words to get the
247a96a7948SMatt Spinlerplaceholders from.  In the example below, SRC word 6 would be used for %1, and
248a96a7948SMatt SpinlerSRC word 7 for %2.
249a96a7948SMatt Spinler
250a96a7948SMatt Spinler```
251a96a7948SMatt Spinler"MessageArgSources":
252a96a7948SMatt Spinler[
253a96a7948SMatt Spinler    "SRCWord6", "SRCWord7"
254a96a7948SMatt Spinler]
255a96a7948SMatt Spinler```
256a96a7948SMatt Spinler
257a96a7948SMatt Spinler#### Description
258a96a7948SMatt SpinlerA short description of the error.  This is required by the Redfish schema to generate a Redfish message entry, but is not used in Redfish or PEL output.
259a96a7948SMatt Spinler
260a96a7948SMatt Spinler```
261a96a7948SMatt Spinler"Description": "A power fault"
262a96a7948SMatt Spinler```
263a96a7948SMatt Spinler
264a96a7948SMatt Spinler#### Notes
265a96a7948SMatt SpinlerThis is an optional free format text field for keeping any notes for the
266a96a7948SMatt Spinlerregistry entry, as comments are not allowed in JSON.  It is an array of strings
267a96a7948SMatt Spinlerfor easier readability of long fields.
268a96a7948SMatt Spinler
269a96a7948SMatt Spinler```
270a96a7948SMatt Spinler"Notes": [
271a96a7948SMatt Spinler    "This entry is for every type of power fault.",
272a96a7948SMatt Spinler    "There is probably a hardware failure."
273a96a7948SMatt Spinler]
274a96a7948SMatt Spinler```
27570311203SMatt Spinler
27670311203SMatt Spinler### Callout Fields
27770311203SMatt SpinlerThe callout fields allow one to specify the PEL callouts (either a hardware
27870311203SMatt SpinlerFRU, a symbolic FRU, or a maintenance procedure) in the entry for a particular
27970311203SMatt Spinlererror.  These callouts can vary based on system type, as well as a user
28070311203SMatt Spinlerspecified AdditionalData property field.   Callouts will be added to the PEL in
28170311203SMatt Spinlerthe order they are listed in the JSON.  If a callout is passed into the error,
28270311203SMatt Spinlersay with CALLOUT_INVENTORY_PATH, then that callout will be added to the PEL
28370311203SMatt Spinlerbefore the callouts in the registry.
28470311203SMatt Spinler
28570311203SMatt SpinlerThere is room for up to 10 callouts in a PEL.
28670311203SMatt Spinler
28770311203SMatt Spinler#### Callouts example based on the system type
28870311203SMatt Spinler
28970311203SMatt Spinler```
29070311203SMatt Spinler"Callouts":
29170311203SMatt Spinler[
29270311203SMatt Spinler    {
29370311203SMatt Spinler        "System": "system1",
29470311203SMatt Spinler        "CalloutList":
29570311203SMatt Spinler        [
29670311203SMatt Spinler            {
29770311203SMatt Spinler                "Priority": "high",
29870311203SMatt Spinler                "LocCode": "P1-C1"
29970311203SMatt Spinler            },
30070311203SMatt Spinler            {
30170311203SMatt Spinler                "Priority": "low",
30270311203SMatt Spinler                "LocCode": "P1"
30370311203SMatt Spinler            }
30470311203SMatt Spinler        ]
30570311203SMatt Spinler    },
30670311203SMatt Spinler    {
30770311203SMatt Spinler        "CalloutList":
30870311203SMatt Spinler        [
30970311203SMatt Spinler            {
31070311203SMatt Spinler                "Priority": "high",
31170311203SMatt Spinler                "Procedure": "SVCDOCS"
31270311203SMatt Spinler            }
31370311203SMatt Spinler        ]
31470311203SMatt Spinler
31570311203SMatt Spinler    }
31670311203SMatt Spinler]
31770311203SMatt Spinler
31870311203SMatt Spinler```
31970311203SMatt Spinler
32070311203SMatt SpinlerThe above example shows that on system 'system1', the FRU at location P1-C1
32170311203SMatt Spinlerwill be called out with a priority of high, and the FRU at P1 with a priority
32270311203SMatt Spinlerof low.  On every other system, the maintenance procedure SVCDOCS is called
32370311203SMatt Spinlerout.
32470311203SMatt Spinler
32570311203SMatt Spinler#### Callouts example based on an AdditionalData field
32670311203SMatt Spinler
32770311203SMatt Spinler```
32870311203SMatt Spinler"CalloutsUsingAD":
32970311203SMatt Spinler{
33070311203SMatt Spinler    "ADName": "PROC_NUM",
33170311203SMatt Spinler    "CalloutsWithTheirADValues":
33270311203SMatt Spinler    [
33370311203SMatt Spinler        {
33470311203SMatt Spinler            "ADValue": "0",
33570311203SMatt Spinler            "Callouts":
33670311203SMatt Spinler            [
33770311203SMatt Spinler                {
33870311203SMatt Spinler                    "CalloutList":
33970311203SMatt Spinler                    [
34070311203SMatt Spinler                        {
34170311203SMatt Spinler                            "Priority": "high",
34270311203SMatt Spinler                            "LocCode": "P1-C5"
34370311203SMatt Spinler                        }
34470311203SMatt Spinler                    ]
34570311203SMatt Spinler                }
34670311203SMatt Spinler            ]
34770311203SMatt Spinler        },
34870311203SMatt Spinler        {
34970311203SMatt Spinler            "ADValue": "1",
35070311203SMatt Spinler            "Callouts":
35170311203SMatt Spinler            [
35270311203SMatt Spinler                {
35370311203SMatt Spinler                    "CalloutList":
35470311203SMatt Spinler                    [
35570311203SMatt Spinler                        {
35670311203SMatt Spinler                            "Priority": "high",
35770311203SMatt Spinler                            "LocCode": "P1-C6"
35870311203SMatt Spinler                        }
35970311203SMatt Spinler                    ]
36070311203SMatt Spinler                }
36170311203SMatt Spinler            ]
36270311203SMatt Spinler        }
36370311203SMatt Spinler    ]
36470311203SMatt Spinler}
36570311203SMatt Spinler
36670311203SMatt Spinler```
36770311203SMatt Spinler
36870311203SMatt SpinlerThis example shows that the callouts were selected based on the 'PROC_NUM'
36970311203SMatt SpinlerAdditionalData field.  When PROC_NUM was 0, the FRU at P1-C5 was called out.
37070311203SMatt SpinlerWhen it was 1, P1-C6 was called out.  Note that the same 'Callouts' array is
37170311203SMatt Spinlerused as in the previous example, so these callouts can also depend on the
37270311203SMatt Spinlersystem type.
37370311203SMatt Spinler
37470311203SMatt Spinler#### CalloutType
37570311203SMatt SpinlerThis field can be used to modify the failing component type field in the
37670311203SMatt Spinlercallout when the default doesn\'t fit:
37770311203SMatt Spinler
37870311203SMatt Spinler```
37970311203SMatt Spinler{
38070311203SMatt Spinler
38170311203SMatt Spinler    "Priority": "high",
38270311203SMatt Spinler    "Procedure": "FIXIT22"
38370311203SMatt Spinler    "CalloutType": "config_procedure"
38470311203SMatt Spinler}
38570311203SMatt Spinler```
38670311203SMatt Spinler
38770311203SMatt SpinlerThe defaults are:
38870311203SMatt Spinler- Normal hardware FRU: hardware_fru
38970311203SMatt Spinler- Symbolic FRU: symbolic_fru
39070311203SMatt Spinler- Procedure: maint_procedure
391d03d3d91SMatt Spinler
392f00f9d0fSMatt Spinler#### Symbolic FRU callouts with dynamic trusted location codes
393f00f9d0fSMatt Spinler
394f00f9d0fSMatt SpinlerA special case is when one wants to use a symbolic FRU callout with a trusted
395f00f9d0fSMatt Spinlerlocation code, but the location code to use isn\'t known until runtime. This
396f00f9d0fSMatt Spinlermeans it can\'t be specified using the 'LocCode' key in the registry.
397f00f9d0fSMatt Spinler
398f00f9d0fSMatt SpinlerIn this case, one should use the 'SymbolicFRUTrusted' key along with the
399f00f9d0fSMatt Spinler'UseInventoryLocCode' key, and then pass in the inventory item that has the
400f00f9d0fSMatt Spinlerdesired location code using the 'CALLOUT_INVENTORY_PATH' entry inside of the
401f00f9d0fSMatt SpinlerAdditionalData property.  The code will then look up the location code for that
402f00f9d0fSMatt Spinlerpassed in inventory FRU and place it in the symbolic FRU callout.  The normal
403f00f9d0fSMatt SpinlerFRU callout with that inventory item will not be created.  The symbolic FRU
404f00f9d0fSMatt Spinlermust be the first callout in the registry for this to work.
405f00f9d0fSMatt Spinler
406f00f9d0fSMatt Spinler```
407f00f9d0fSMatt Spinler{
408f00f9d0fSMatt Spinler
409f00f9d0fSMatt Spinler    "Priority": "high",
410f00f9d0fSMatt Spinler    "SymbolicFRUTrusted": "AIR_MOVR",
411f00f9d0fSMatt Spinler    "UseInventoryLocCode": true
412f00f9d0fSMatt Spinler}
413f00f9d0fSMatt Spinler```
414f00f9d0fSMatt Spinler
415d03d3d91SMatt Spinler## Modifying and Testing
416d03d3d91SMatt Spinler
417d03d3d91SMatt SpinlerThe general process for adding new entries to the message registry is:
418d03d3d91SMatt Spinler
419d03d3d91SMatt Spinler1. Update message_registry.json to add the new errors.
420d03d3d91SMatt Spinler2. If a new component ID is used (usually the first byte of the SRC reason
421d03d3d91SMatt Spinler   code), document it in ComponentIDs.md.
422d03d3d91SMatt Spinler3. Validate the file. It must be valid JSON and obey the schema.  The
423d03d3d91SMatt Spinler   `process_registry.py` script in `extensions/openpower-pels/registry/tools`
424d03d3d91SMatt Spinler   will validate both, though it requires the python-jsonschema package to do
425d03d3d91SMatt Spinler   the schema validation.  This script is also run to validate the message
426d03d3d91SMatt Spinler   registry as part of CI testing.
427d03d3d91SMatt Spinler
428d03d3d91SMatt Spinler```
429d03d3d91SMatt Spinler ./tools/process_registry.py -v -s schema/schema.json -r message_registry.json
430d03d3d91SMatt Spinler```
431d03d3d91SMatt Spinler
432d03d3d91SMatt Spinler4. One can test what PELs are generated from these new entries without writing
433d03d3d91SMatt Spinler   any code to create the corresponding event logs:
434d03d3d91SMatt Spinler    1. Copy the modified message_registry.json into `/etc/phosphor-logging/` on
435d03d3d91SMatt Spinler       the BMC. That directory may need to be created.
436d03d3d91SMatt Spinler    2. Use busctl to call the Create method to create an event log
437d03d3d91SMatt Spinler       corresponding to the message registry entry under test.
438d03d3d91SMatt Spinler
439d03d3d91SMatt Spinler```
440d03d3d91SMatt Spinlerbusctl call xyz.openbmc_project.Logging /xyz/openbmc_project/logging \
441d03d3d91SMatt Spinlerxyz.openbmc_project.Logging.Create Create ssa{ss} \
442d03d3d91SMatt Spinlerxyz.openbmc_project.Common.Error.Timeout \
443d03d3d91SMatt Spinlerxyz.openbmc_project.Logging.Entry.Level.Error 1 "TIMEOUT_IN_MSEC" "5"
444d03d3d91SMatt Spinler```
445d03d3d91SMatt Spinler
446d03d3d91SMatt Spinler    3. Check the PEL that was created using peltool.
447d03d3d91SMatt Spinler    4. When finished, delete the file from `/etc/phosphor-logging/`.
448