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) 9a96a7948SMatt Spinler 10a96a7948SMatt Spinler## Component IDs 11a96a7948SMatt SpinlerA component ID is a 2 byte value of the form 0xYY00 used in a PEL to: 12a96a7948SMatt Spinler1. Provide the upper byte (the YY from above) of an SRC reason code in `BD` 13a96a7948SMatt Spinler SRCs. 14a96a7948SMatt Spinler2. Reside in the section header of the Private Header PEL section to specify 15a96a7948SMatt Spinler the error log creator's component ID. 16a96a7948SMatt Spinler3. Reside in the section header of the User Header section to specify the error 17a96a7948SMatt Spinler log committer's component ID. 18a96a7948SMatt Spinler4. Reside in the section header in the User Data section to specify which 19a96a7948SMatt Spinler parser to call to parse that section. 20a96a7948SMatt Spinler 21a96a7948SMatt SpinlerComponent IDs are specified in the message registry either as the upper byte of 22a96a7948SMatt Spinlerthe SRC reason code field for `BD` SRCs, or in the standalone `ComponentID` 23a96a7948SMatt Spinlerfield. 24a96a7948SMatt Spinler 25a96a7948SMatt SpinlerComponent IDs will be unique on a per-repository basis for errors unique to 26a96a7948SMatt Spinlerthat repository. When the same errors are created by multiple repositories, 27a96a7948SMatt Spinlerthose errors will all share the same component ID. The master list of 28a96a7948SMatt Spinlercomponent IDs is [here](ComponentIDs.md). 29a96a7948SMatt Spinler 30a96a7948SMatt Spinler## Message Registry Fields 31a96a7948SMatt SpinlerThe message registry schema is [here](schema/schema.json), and the message 32a96a7948SMatt Spinlerregistry itself is [here](message_registry.json). The schema will be validated 33a96a7948SMatt Spinlereither during a bitbake build or during CI, or eventually possibly both. 34a96a7948SMatt Spinler 35a96a7948SMatt SpinlerIn the message registry, there are fields for specifying: 36a96a7948SMatt Spinler 37a96a7948SMatt Spinler### Name 38a96a7948SMatt SpinlerThis is the key into the message registry, and is the Message property 39a96a7948SMatt Spinlerof the OpenBMC event log that the PEL is being created from. 40a96a7948SMatt Spinler 41a96a7948SMatt Spinler``` 42a96a7948SMatt Spinler"Name": "xyz.openbmc_project.Power.Fault" 43a96a7948SMatt Spinler``` 44a96a7948SMatt Spinler 45a96a7948SMatt Spinler### Subsystem 46a96a7948SMatt SpinlerThis field is part of the PEL User Header section, and is used to specify 47a96a7948SMatt Spinlerthe subsystem pertaining to the error. It is an enumeration that maps to the 48a96a7948SMatt Spinleractual PEL value. 49a96a7948SMatt Spinler 50a96a7948SMatt Spinler``` 51a96a7948SMatt Spinler"Subsystem": "power_supply" 52a96a7948SMatt Spinler``` 53a96a7948SMatt Spinler 54a96a7948SMatt Spinler### Severity 55a96a7948SMatt SpinlerThis field is part of the PEL User Header section, and is used to specify 56a96a7948SMatt Spinlerthe PEL severity. It is an optional field, if it isn't specified, then the 57a96a7948SMatt Spinlerseverity of the OpenBMC event log will be converted into a PEL severity value. 58a96a7948SMatt Spinler 59a96a7948SMatt Spinler``` 60a96a7948SMatt Spinler"Severity": "unrecoverable" 61a96a7948SMatt Spinler``` 62a96a7948SMatt Spinler 63a96a7948SMatt Spinler### Mfg Severity 64a96a7948SMatt SpinlerThis is an optional field and is used to override the Severity field when a 65a96a7948SMatt Spinlerspecific manufacturing isolation mode is enabled. 66a96a7948SMatt Spinler 67a96a7948SMatt Spinler``` 68a96a7948SMatt Spinler"MfgSeverity": "unrecoverable" 69a96a7948SMatt Spinler``` 70a96a7948SMatt Spinler 71a96a7948SMatt Spinler### Event Scope 72a96a7948SMatt SpinlerThis field is part of the PEL User Header section, and is used to specify 73a96a7948SMatt Spinlerthe event scope, as defined by the PEL spec. It is optional and defaults to 74a96a7948SMatt Spinler"entire platform". 75a96a7948SMatt Spinler 76a96a7948SMatt Spinler``` 77a96a7948SMatt Spinler"EventScope": "entire_platform" 78a96a7948SMatt Spinler``` 79a96a7948SMatt Spinler 80a96a7948SMatt Spinler### Event Type 81a96a7948SMatt SpinlerThis field is part of the PEL User Header section, and is used to specify 82a96a7948SMatt Spinlerthe event type, as defined by the PEL spec. It is optional and defaults to 833fb208e3SMatt Spinler"not applicable" for non-informational logs, and "misc_information_only" for 843fb208e3SMatt Spinlerinformational ones. 85a96a7948SMatt Spinler 86a96a7948SMatt Spinler``` 87a96a7948SMatt Spinler"EventType": "na" 88a96a7948SMatt Spinler``` 89a96a7948SMatt Spinler 90a96a7948SMatt Spinler### Action Flags 91a96a7948SMatt SpinlerThis field is part of the PEL User Header section, and is used to specify the 92a96a7948SMatt SpinlerPEL action flags, as defined by the PEL spec. It is an array of enumerations. 93a96a7948SMatt Spinler 943fb208e3SMatt SpinlerThe action flags can usually be deduced from other PEL fields, such as the 953fb208e3SMatt Spinlerseverity or if there are any callouts. As such, this is an optional field and 963fb208e3SMatt Spinlerif not supplied the code will fill them in based on those fields. 973fb208e3SMatt Spinler 983fb208e3SMatt SpinlerIn fact, even if supplied here, the code may still modify them to ensure they 993fb208e3SMatt Spinlerare correct. 1003fb208e3SMatt Spinler 101a96a7948SMatt Spinler``` 102a96a7948SMatt Spinler"ActionFlags": ["service_action", "report", "call_home"] 103a96a7948SMatt Spinler``` 104a96a7948SMatt Spinler 105a96a7948SMatt Spinler### Mfg Action Flags 106a96a7948SMatt SpinlerThis is an optional field and is used to override the Action Flags field when a 107a96a7948SMatt Spinlerspecific manufacturing isolation mode is enabled. 108a96a7948SMatt Spinler 109a96a7948SMatt Spinler``` 110a96a7948SMatt Spinler"MfgActionFlags": ["service_action", "report", "call_home"] 111a96a7948SMatt Spinler``` 112a96a7948SMatt Spinler 113a96a7948SMatt Spinler### Component ID 114a96a7948SMatt SpinlerThis is the component ID of the PEL creator, in the form 0xYY00. For `BD` 115a96a7948SMatt SpinlerSRCs, this is an optional field and if not present the value will be taken from 116a96a7948SMatt Spinlerthe upper byte of the reason code. If present for `BD` SRCs, then this byte 117a96a7948SMatt Spinlermust match the upper byte of the reason code. 118a96a7948SMatt Spinler 119a96a7948SMatt Spinler``` 120a96a7948SMatt Spinler"ComponentID": "0x5500" 121a96a7948SMatt Spinler``` 122a96a7948SMatt Spinler 123a96a7948SMatt Spinler### SRC Type 124a96a7948SMatt SpinlerThis specifies the type of SRC to create. The type is the first 2 characters 125a96a7948SMatt Spinlerof the 8 character ASCII string field of the PEL. The allowed types are `BD`, 126a96a7948SMatt Spinlerfor the standard OpenBMC error, and `11`, for power related errors. It is 127a96a7948SMatt Spinleroptional and if not specified will default to `BD`. 128a96a7948SMatt Spinler 129a96a7948SMatt SpinlerNote: The ASCII string for BD SRCs looks like: `BDBBCCCC`, where: 130a96a7948SMatt Spinler* BD = SRC type 131a96a7948SMatt Spinler* BB = PEL subsystem as mentioned above 132a96a7948SMatt Spinler* CCCC SRC reason code 133a96a7948SMatt Spinler 134a96a7948SMatt SpinlerFor `11` SRCs, it looks like: `1100RRRR`, where RRRR is the SRC reason code. 135a96a7948SMatt Spinler 136a96a7948SMatt Spinler``` 137a96a7948SMatt Spinler"Type": "11" 138a96a7948SMatt Spinler``` 139a96a7948SMatt Spinler 140a96a7948SMatt Spinler### SRC Reason Code 141a96a7948SMatt SpinlerThis is the 4 character value in the latter half of the SRC ASCII string. It 142a96a7948SMatt Spinleris treated as a 2 byte hex value, such as 0x5678. For `BD` SRCs, the first 143a96a7948SMatt Spinlerbyte is the same as the first byte of the component ID field in the Private 144a96a7948SMatt SpinlerHeader section that represents the creator's component ID. 145a96a7948SMatt Spinler 146a96a7948SMatt Spinler``` 147a96a7948SMatt Spinler"ReasonCode": "0x5544" 148a96a7948SMatt Spinler``` 149a96a7948SMatt Spinler 150a96a7948SMatt Spinler### SRC Symptom ID Fields 151a96a7948SMatt SpinlerThe symptom ID is in the Extended User Header section and is defined in the PEL 152a96a7948SMatt Spinlerspec as the unique event signature string. It always starts with the ASCII 153a96a7948SMatt Spinlerstring. This field in the message registry allows one to choose which SRC words 154a96a7948SMatt Spinlerto use in addition to the ASCII string field to form the symptom ID. All words 155a96a7948SMatt Spinlerare separated by underscores. If not specified, the code will choose a default 156a96a7948SMatt Spinlerformat, which may depend on the SRC type. 157a96a7948SMatt Spinler 158a96a7948SMatt SpinlerFor example: ["SRCWord3", "SRCWord9"] would be: 159a96a7948SMatt Spinler`<ASCII_STRING>_<SRCWord3>_<SRCWord9>`, which could look like: 160a96a7948SMatt Spinler`B181320_00000050_49000000`. 161a96a7948SMatt Spinler 162a96a7948SMatt Spinler``` 163a96a7948SMatt Spinler"SymptomIDFields": ["SRCWord3", "SRCWord9"] 164a96a7948SMatt Spinler``` 165a96a7948SMatt Spinler 166a96a7948SMatt Spinler### SRC words 6 to 9 167a96a7948SMatt SpinlerIn a PEL, these SRC words are free format and can be filled in by the user as 168a96a7948SMatt Spinlerdesired. On the BMC, the source of these words is the AdditionalData fields in 169a96a7948SMatt Spinlerthe event log. The message registry provides a way for the log creator to 170a96a7948SMatt Spinlerspecify which AdditionalData property field to get the data from, and also to 171a96a7948SMatt Spinlerdefine what the SRC word means for use by parsers. If not specified, these SRC 172a96a7948SMatt Spinlerwords will be set to zero in the PEL. 173a96a7948SMatt Spinler 174a96a7948SMatt Spinler``` 175a96a7948SMatt Spinler"Words6to9": 176a96a7948SMatt Spinler{ 177a96a7948SMatt Spinler "6": 178a96a7948SMatt Spinler { 179a96a7948SMatt Spinler "description": "Failing unit number", 180a96a7948SMatt Spinler "AdditionalDataPropSource": "PS_NUM" 181a96a7948SMatt Spinler } 182a96a7948SMatt Spinler} 183a96a7948SMatt Spinler``` 184a96a7948SMatt Spinler 185a96a7948SMatt Spinler### SRC Power Fault flag 186a96a7948SMatt SpinlerThe SRC has a bit in it to indicate if the error is a power fault. This is an 187a96a7948SMatt Spinleroptional field in the message registry and defaults to false. 188a96a7948SMatt Spinler 189a96a7948SMatt Spinler``` 190a96a7948SMatt Spinler"PowerFault: false 191a96a7948SMatt Spinler``` 192a96a7948SMatt Spinler 193a96a7948SMatt Spinler### Documentation Fields 194a96a7948SMatt SpinlerThe documentation fields are used by PEL parsers to display a human readable 195a96a7948SMatt Spinlerdescription of a PEL. They are also the source for the Redfish event log 196a96a7948SMatt Spinlermessages. 197a96a7948SMatt Spinler 198a96a7948SMatt Spinler#### Message 199a96a7948SMatt SpinlerThis field is used by the BMC's PEL parser as the description of the error log. 200a96a7948SMatt SpinlerIt will also be used in Redfish event logs. It supports argument substitution 201a96a7948SMatt Spinlerusing the %1, %2, etc placeholders allowing any of the SRC user data words 6 - 202a96a7948SMatt Spinler9 to be displayed as part of the message. If the placeholders are used, then 203a96a7948SMatt Spinlerthe `MessageArgSources` property must be present to say which SRC words to use 204a96a7948SMatt Spinlerfor each placeholder. 205a96a7948SMatt Spinler 206a96a7948SMatt Spinler``` 207a96a7948SMatt Spinler"Message": "Processor %1 had %2 errors" 208a96a7948SMatt Spinler``` 209a96a7948SMatt Spinler 210a96a7948SMatt Spinler#### MessageArgSources 211a96a7948SMatt SpinlerThis optional field is required when the Message field contains the %X 212a96a7948SMatt Spinlerplaceholder arguments. It is an array that says which SRC words to get the 213a96a7948SMatt Spinlerplaceholders from. In the example below, SRC word 6 would be used for %1, and 214a96a7948SMatt SpinlerSRC word 7 for %2. 215a96a7948SMatt Spinler 216a96a7948SMatt Spinler``` 217a96a7948SMatt Spinler"MessageArgSources": 218a96a7948SMatt Spinler[ 219a96a7948SMatt Spinler "SRCWord6", "SRCWord7" 220a96a7948SMatt Spinler] 221a96a7948SMatt Spinler``` 222a96a7948SMatt Spinler 223a96a7948SMatt Spinler#### Description 224a96a7948SMatt 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. 225a96a7948SMatt Spinler 226a96a7948SMatt Spinler``` 227a96a7948SMatt Spinler"Description": "A power fault" 228a96a7948SMatt Spinler``` 229a96a7948SMatt Spinler 230a96a7948SMatt Spinler#### Notes 231a96a7948SMatt SpinlerThis is an optional free format text field for keeping any notes for the 232a96a7948SMatt Spinlerregistry entry, as comments are not allowed in JSON. It is an array of strings 233a96a7948SMatt Spinlerfor easier readability of long fields. 234a96a7948SMatt Spinler 235a96a7948SMatt Spinler``` 236a96a7948SMatt Spinler"Notes": [ 237a96a7948SMatt Spinler "This entry is for every type of power fault.", 238a96a7948SMatt Spinler "There is probably a hardware failure." 239a96a7948SMatt Spinler] 240a96a7948SMatt Spinler``` 241*70311203SMatt Spinler 242*70311203SMatt Spinler### Callout Fields 243*70311203SMatt SpinlerThe callout fields allow one to specify the PEL callouts (either a hardware 244*70311203SMatt SpinlerFRU, a symbolic FRU, or a maintenance procedure) in the entry for a particular 245*70311203SMatt Spinlererror. These callouts can vary based on system type, as well as a user 246*70311203SMatt Spinlerspecified AdditionalData property field. Callouts will be added to the PEL in 247*70311203SMatt Spinlerthe order they are listed in the JSON. If a callout is passed into the error, 248*70311203SMatt Spinlersay with CALLOUT_INVENTORY_PATH, then that callout will be added to the PEL 249*70311203SMatt Spinlerbefore the callouts in the registry. 250*70311203SMatt Spinler 251*70311203SMatt SpinlerThere is room for up to 10 callouts in a PEL. 252*70311203SMatt Spinler 253*70311203SMatt Spinler#### Callouts example based on the system type 254*70311203SMatt Spinler 255*70311203SMatt Spinler``` 256*70311203SMatt Spinler"Callouts": 257*70311203SMatt Spinler[ 258*70311203SMatt Spinler { 259*70311203SMatt Spinler "System": "system1", 260*70311203SMatt Spinler "CalloutList": 261*70311203SMatt Spinler [ 262*70311203SMatt Spinler { 263*70311203SMatt Spinler "Priority": "high", 264*70311203SMatt Spinler "LocCode": "P1-C1" 265*70311203SMatt Spinler }, 266*70311203SMatt Spinler { 267*70311203SMatt Spinler "Priority": "low", 268*70311203SMatt Spinler "LocCode": "P1" 269*70311203SMatt Spinler } 270*70311203SMatt Spinler ] 271*70311203SMatt Spinler }, 272*70311203SMatt Spinler { 273*70311203SMatt Spinler "CalloutList": 274*70311203SMatt Spinler [ 275*70311203SMatt Spinler { 276*70311203SMatt Spinler "Priority": "high", 277*70311203SMatt Spinler "Procedure": "SVCDOCS" 278*70311203SMatt Spinler } 279*70311203SMatt Spinler ] 280*70311203SMatt Spinler 281*70311203SMatt Spinler } 282*70311203SMatt Spinler] 283*70311203SMatt Spinler 284*70311203SMatt Spinler``` 285*70311203SMatt Spinler 286*70311203SMatt SpinlerThe above example shows that on system 'system1', the FRU at location P1-C1 287*70311203SMatt Spinlerwill be called out with a priority of high, and the FRU at P1 with a priority 288*70311203SMatt Spinlerof low. On every other system, the maintenance procedure SVCDOCS is called 289*70311203SMatt Spinlerout. 290*70311203SMatt Spinler 291*70311203SMatt Spinler#### Callouts example based on an AdditionalData field 292*70311203SMatt Spinler 293*70311203SMatt Spinler``` 294*70311203SMatt Spinler"CalloutsUsingAD": 295*70311203SMatt Spinler{ 296*70311203SMatt Spinler "ADName": "PROC_NUM", 297*70311203SMatt Spinler "CalloutsWithTheirADValues": 298*70311203SMatt Spinler [ 299*70311203SMatt Spinler { 300*70311203SMatt Spinler "ADValue": "0", 301*70311203SMatt Spinler "Callouts": 302*70311203SMatt Spinler [ 303*70311203SMatt Spinler { 304*70311203SMatt Spinler "CalloutList": 305*70311203SMatt Spinler [ 306*70311203SMatt Spinler { 307*70311203SMatt Spinler "Priority": "high", 308*70311203SMatt Spinler "LocCode": "P1-C5" 309*70311203SMatt Spinler } 310*70311203SMatt Spinler ] 311*70311203SMatt Spinler } 312*70311203SMatt Spinler ] 313*70311203SMatt Spinler }, 314*70311203SMatt Spinler { 315*70311203SMatt Spinler "ADValue": "1", 316*70311203SMatt Spinler "Callouts": 317*70311203SMatt Spinler [ 318*70311203SMatt Spinler { 319*70311203SMatt Spinler "CalloutList": 320*70311203SMatt Spinler [ 321*70311203SMatt Spinler { 322*70311203SMatt Spinler "Priority": "high", 323*70311203SMatt Spinler "LocCode": "P1-C6" 324*70311203SMatt Spinler } 325*70311203SMatt Spinler ] 326*70311203SMatt Spinler } 327*70311203SMatt Spinler ] 328*70311203SMatt Spinler } 329*70311203SMatt Spinler ] 330*70311203SMatt Spinler} 331*70311203SMatt Spinler 332*70311203SMatt Spinler``` 333*70311203SMatt Spinler 334*70311203SMatt SpinlerThis example shows that the callouts were selected based on the 'PROC_NUM' 335*70311203SMatt SpinlerAdditionalData field. When PROC_NUM was 0, the FRU at P1-C5 was called out. 336*70311203SMatt SpinlerWhen it was 1, P1-C6 was called out. Note that the same 'Callouts' array is 337*70311203SMatt Spinlerused as in the previous example, so these callouts can also depend on the 338*70311203SMatt Spinlersystem type. 339*70311203SMatt Spinler 340*70311203SMatt Spinler#### CalloutType 341*70311203SMatt SpinlerThis field can be used to modify the failing component type field in the 342*70311203SMatt Spinlercallout when the default doesn\'t fit: 343*70311203SMatt Spinler 344*70311203SMatt Spinler``` 345*70311203SMatt Spinler{ 346*70311203SMatt Spinler 347*70311203SMatt Spinler "Priority": "high", 348*70311203SMatt Spinler "Procedure": "FIXIT22" 349*70311203SMatt Spinler "CalloutType": "config_procedure" 350*70311203SMatt Spinler} 351*70311203SMatt Spinler``` 352*70311203SMatt Spinler 353*70311203SMatt SpinlerThe defaults are: 354*70311203SMatt Spinler- Normal hardware FRU: hardware_fru 355*70311203SMatt Spinler- Symbolic FRU: symbolic_fru 356*70311203SMatt Spinler- Procedure: maint_procedure 357