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 59*17952d94SMatt SpinlerIt can either be the plain severity value, or an array of severity values that 60*17952d94SMatt Spinlerare based on system type, where an entry without a system type will match 61*17952d94SMatt Spinleranything unless another entry has a matching system type. 62*17952d94SMatt Spinler 63a96a7948SMatt Spinler``` 64a96a7948SMatt Spinler"Severity": "unrecoverable" 65a96a7948SMatt Spinler``` 66a96a7948SMatt Spinler 67*17952d94SMatt Spinler``` 68*17952d94SMatt SpinlerSeverity": 69*17952d94SMatt Spinler[ 70*17952d94SMatt Spinler { 71*17952d94SMatt Spinler "System": "system1", 72*17952d94SMatt Spinler "SevValue": "recovered" 73*17952d94SMatt Spinler }, 74*17952d94SMatt Spinler { 75*17952d94SMatt Spinler "Severity": "unrecoverable" 76*17952d94SMatt Spinler } 77*17952d94SMatt Spinler] 78*17952d94SMatt Spinler``` 79*17952d94SMatt SpinlerThe above example shows that on system 'system1' the severity will be 80*17952d94SMatt Spinlerrecovered, and on every other system it will be unrecoverable. 81*17952d94SMatt Spinler 82a96a7948SMatt Spinler### Mfg Severity 83a96a7948SMatt SpinlerThis is an optional field and is used to override the Severity field when a 84*17952d94SMatt Spinlerspecific manufacturing isolation mode is enabled. It has the same format as 85*17952d94SMatt SpinlerSeverity. 86a96a7948SMatt Spinler 87a96a7948SMatt Spinler``` 88a96a7948SMatt Spinler"MfgSeverity": "unrecoverable" 89a96a7948SMatt Spinler``` 90a96a7948SMatt Spinler 91a96a7948SMatt Spinler### Event Scope 92a96a7948SMatt SpinlerThis field is part of the PEL User Header section, and is used to specify 93a96a7948SMatt Spinlerthe event scope, as defined by the PEL spec. It is optional and defaults to 94a96a7948SMatt Spinler"entire platform". 95a96a7948SMatt Spinler 96a96a7948SMatt Spinler``` 97a96a7948SMatt Spinler"EventScope": "entire_platform" 98a96a7948SMatt Spinler``` 99a96a7948SMatt Spinler 100a96a7948SMatt Spinler### Event Type 101a96a7948SMatt SpinlerThis field is part of the PEL User Header section, and is used to specify 102a96a7948SMatt Spinlerthe event type, as defined by the PEL spec. It is optional and defaults to 1033fb208e3SMatt Spinler"not applicable" for non-informational logs, and "misc_information_only" for 1043fb208e3SMatt Spinlerinformational ones. 105a96a7948SMatt Spinler 106a96a7948SMatt Spinler``` 107a96a7948SMatt Spinler"EventType": "na" 108a96a7948SMatt Spinler``` 109a96a7948SMatt Spinler 110a96a7948SMatt Spinler### Action Flags 111a96a7948SMatt SpinlerThis field is part of the PEL User Header section, and is used to specify the 112a96a7948SMatt SpinlerPEL action flags, as defined by the PEL spec. It is an array of enumerations. 113a96a7948SMatt Spinler 1143fb208e3SMatt SpinlerThe action flags can usually be deduced from other PEL fields, such as the 1153fb208e3SMatt Spinlerseverity or if there are any callouts. As such, this is an optional field and 1163fb208e3SMatt Spinlerif not supplied the code will fill them in based on those fields. 1173fb208e3SMatt Spinler 1183fb208e3SMatt SpinlerIn fact, even if supplied here, the code may still modify them to ensure they 1193fb208e3SMatt Spinlerare correct. 1203fb208e3SMatt Spinler 121a96a7948SMatt Spinler``` 122a96a7948SMatt Spinler"ActionFlags": ["service_action", "report", "call_home"] 123a96a7948SMatt Spinler``` 124a96a7948SMatt Spinler 125a96a7948SMatt Spinler### Mfg Action Flags 126a96a7948SMatt SpinlerThis is an optional field and is used to override the Action Flags field when a 127a96a7948SMatt Spinlerspecific manufacturing isolation mode is enabled. 128a96a7948SMatt Spinler 129a96a7948SMatt Spinler``` 130a96a7948SMatt Spinler"MfgActionFlags": ["service_action", "report", "call_home"] 131a96a7948SMatt Spinler``` 132a96a7948SMatt Spinler 133a96a7948SMatt Spinler### Component ID 134a96a7948SMatt SpinlerThis is the component ID of the PEL creator, in the form 0xYY00. For `BD` 135a96a7948SMatt SpinlerSRCs, this is an optional field and if not present the value will be taken from 136a96a7948SMatt Spinlerthe upper byte of the reason code. If present for `BD` SRCs, then this byte 137a96a7948SMatt Spinlermust match the upper byte of the reason code. 138a96a7948SMatt Spinler 139a96a7948SMatt Spinler``` 140a96a7948SMatt Spinler"ComponentID": "0x5500" 141a96a7948SMatt Spinler``` 142a96a7948SMatt Spinler 143a96a7948SMatt Spinler### SRC Type 144a96a7948SMatt SpinlerThis specifies the type of SRC to create. The type is the first 2 characters 145a96a7948SMatt Spinlerof the 8 character ASCII string field of the PEL. The allowed types are `BD`, 146a96a7948SMatt Spinlerfor the standard OpenBMC error, and `11`, for power related errors. It is 147a96a7948SMatt Spinleroptional and if not specified will default to `BD`. 148a96a7948SMatt Spinler 149a96a7948SMatt SpinlerNote: The ASCII string for BD SRCs looks like: `BDBBCCCC`, where: 150a96a7948SMatt Spinler* BD = SRC type 151a96a7948SMatt Spinler* BB = PEL subsystem as mentioned above 152a96a7948SMatt Spinler* CCCC SRC reason code 153a96a7948SMatt Spinler 154a96a7948SMatt SpinlerFor `11` SRCs, it looks like: `1100RRRR`, where RRRR is the SRC reason code. 155a96a7948SMatt Spinler 156a96a7948SMatt Spinler``` 157a96a7948SMatt Spinler"Type": "11" 158a96a7948SMatt Spinler``` 159a96a7948SMatt Spinler 160a96a7948SMatt Spinler### SRC Reason Code 161a96a7948SMatt SpinlerThis is the 4 character value in the latter half of the SRC ASCII string. It 162a96a7948SMatt Spinleris treated as a 2 byte hex value, such as 0x5678. For `BD` SRCs, the first 163a96a7948SMatt Spinlerbyte is the same as the first byte of the component ID field in the Private 164a96a7948SMatt SpinlerHeader section that represents the creator's component ID. 165a96a7948SMatt Spinler 166a96a7948SMatt Spinler``` 167a96a7948SMatt Spinler"ReasonCode": "0x5544" 168a96a7948SMatt Spinler``` 169a96a7948SMatt Spinler 170a96a7948SMatt Spinler### SRC Symptom ID Fields 171a96a7948SMatt SpinlerThe symptom ID is in the Extended User Header section and is defined in the PEL 172a96a7948SMatt Spinlerspec as the unique event signature string. It always starts with the ASCII 173a96a7948SMatt Spinlerstring. This field in the message registry allows one to choose which SRC words 174a96a7948SMatt Spinlerto use in addition to the ASCII string field to form the symptom ID. All words 175a96a7948SMatt Spinlerare separated by underscores. If not specified, the code will choose a default 176a96a7948SMatt Spinlerformat, which may depend on the SRC type. 177a96a7948SMatt Spinler 178a96a7948SMatt SpinlerFor example: ["SRCWord3", "SRCWord9"] would be: 179a96a7948SMatt Spinler`<ASCII_STRING>_<SRCWord3>_<SRCWord9>`, which could look like: 180a96a7948SMatt Spinler`B181320_00000050_49000000`. 181a96a7948SMatt Spinler 182a96a7948SMatt Spinler``` 183a96a7948SMatt Spinler"SymptomIDFields": ["SRCWord3", "SRCWord9"] 184a96a7948SMatt Spinler``` 185a96a7948SMatt Spinler 186a96a7948SMatt Spinler### SRC words 6 to 9 187a96a7948SMatt SpinlerIn a PEL, these SRC words are free format and can be filled in by the user as 188a96a7948SMatt Spinlerdesired. On the BMC, the source of these words is the AdditionalData fields in 189a96a7948SMatt Spinlerthe event log. The message registry provides a way for the log creator to 190a96a7948SMatt Spinlerspecify which AdditionalData property field to get the data from, and also to 191a96a7948SMatt Spinlerdefine what the SRC word means for use by parsers. If not specified, these SRC 192a96a7948SMatt Spinlerwords will be set to zero in the PEL. 193a96a7948SMatt Spinler 194a96a7948SMatt Spinler``` 195a96a7948SMatt Spinler"Words6to9": 196a96a7948SMatt Spinler{ 197a96a7948SMatt Spinler "6": 198a96a7948SMatt Spinler { 199a96a7948SMatt Spinler "description": "Failing unit number", 200a96a7948SMatt Spinler "AdditionalDataPropSource": "PS_NUM" 201a96a7948SMatt Spinler } 202a96a7948SMatt Spinler} 203a96a7948SMatt Spinler``` 204a96a7948SMatt Spinler 205a96a7948SMatt Spinler### SRC Power Fault flag 206a96a7948SMatt SpinlerThe SRC has a bit in it to indicate if the error is a power fault. This is an 207a96a7948SMatt Spinleroptional field in the message registry and defaults to false. 208a96a7948SMatt Spinler 209a96a7948SMatt Spinler``` 210a96a7948SMatt Spinler"PowerFault: false 211a96a7948SMatt Spinler``` 212a96a7948SMatt Spinler 213a96a7948SMatt Spinler### Documentation Fields 214a96a7948SMatt SpinlerThe documentation fields are used by PEL parsers to display a human readable 215a96a7948SMatt Spinlerdescription of a PEL. They are also the source for the Redfish event log 216a96a7948SMatt Spinlermessages. 217a96a7948SMatt Spinler 218a96a7948SMatt Spinler#### Message 219a96a7948SMatt SpinlerThis field is used by the BMC's PEL parser as the description of the error log. 220a96a7948SMatt SpinlerIt will also be used in Redfish event logs. It supports argument substitution 221a96a7948SMatt Spinlerusing the %1, %2, etc placeholders allowing any of the SRC user data words 6 - 222a96a7948SMatt Spinler9 to be displayed as part of the message. If the placeholders are used, then 223a96a7948SMatt Spinlerthe `MessageArgSources` property must be present to say which SRC words to use 224a96a7948SMatt Spinlerfor each placeholder. 225a96a7948SMatt Spinler 226a96a7948SMatt Spinler``` 227a96a7948SMatt Spinler"Message": "Processor %1 had %2 errors" 228a96a7948SMatt Spinler``` 229a96a7948SMatt Spinler 230a96a7948SMatt Spinler#### MessageArgSources 231a96a7948SMatt SpinlerThis optional field is required when the Message field contains the %X 232a96a7948SMatt Spinlerplaceholder arguments. It is an array that says which SRC words to get the 233a96a7948SMatt Spinlerplaceholders from. In the example below, SRC word 6 would be used for %1, and 234a96a7948SMatt SpinlerSRC word 7 for %2. 235a96a7948SMatt Spinler 236a96a7948SMatt Spinler``` 237a96a7948SMatt Spinler"MessageArgSources": 238a96a7948SMatt Spinler[ 239a96a7948SMatt Spinler "SRCWord6", "SRCWord7" 240a96a7948SMatt Spinler] 241a96a7948SMatt Spinler``` 242a96a7948SMatt Spinler 243a96a7948SMatt Spinler#### Description 244a96a7948SMatt 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. 245a96a7948SMatt Spinler 246a96a7948SMatt Spinler``` 247a96a7948SMatt Spinler"Description": "A power fault" 248a96a7948SMatt Spinler``` 249a96a7948SMatt Spinler 250a96a7948SMatt Spinler#### Notes 251a96a7948SMatt SpinlerThis is an optional free format text field for keeping any notes for the 252a96a7948SMatt Spinlerregistry entry, as comments are not allowed in JSON. It is an array of strings 253a96a7948SMatt Spinlerfor easier readability of long fields. 254a96a7948SMatt Spinler 255a96a7948SMatt Spinler``` 256a96a7948SMatt Spinler"Notes": [ 257a96a7948SMatt Spinler "This entry is for every type of power fault.", 258a96a7948SMatt Spinler "There is probably a hardware failure." 259a96a7948SMatt Spinler] 260a96a7948SMatt Spinler``` 26170311203SMatt Spinler 26270311203SMatt Spinler### Callout Fields 26370311203SMatt SpinlerThe callout fields allow one to specify the PEL callouts (either a hardware 26470311203SMatt SpinlerFRU, a symbolic FRU, or a maintenance procedure) in the entry for a particular 26570311203SMatt Spinlererror. These callouts can vary based on system type, as well as a user 26670311203SMatt Spinlerspecified AdditionalData property field. Callouts will be added to the PEL in 26770311203SMatt Spinlerthe order they are listed in the JSON. If a callout is passed into the error, 26870311203SMatt Spinlersay with CALLOUT_INVENTORY_PATH, then that callout will be added to the PEL 26970311203SMatt Spinlerbefore the callouts in the registry. 27070311203SMatt Spinler 27170311203SMatt SpinlerThere is room for up to 10 callouts in a PEL. 27270311203SMatt Spinler 27370311203SMatt Spinler#### Callouts example based on the system type 27470311203SMatt Spinler 27570311203SMatt Spinler``` 27670311203SMatt Spinler"Callouts": 27770311203SMatt Spinler[ 27870311203SMatt Spinler { 27970311203SMatt Spinler "System": "system1", 28070311203SMatt Spinler "CalloutList": 28170311203SMatt Spinler [ 28270311203SMatt Spinler { 28370311203SMatt Spinler "Priority": "high", 28470311203SMatt Spinler "LocCode": "P1-C1" 28570311203SMatt Spinler }, 28670311203SMatt Spinler { 28770311203SMatt Spinler "Priority": "low", 28870311203SMatt Spinler "LocCode": "P1" 28970311203SMatt Spinler } 29070311203SMatt Spinler ] 29170311203SMatt Spinler }, 29270311203SMatt Spinler { 29370311203SMatt Spinler "CalloutList": 29470311203SMatt Spinler [ 29570311203SMatt Spinler { 29670311203SMatt Spinler "Priority": "high", 29770311203SMatt Spinler "Procedure": "SVCDOCS" 29870311203SMatt Spinler } 29970311203SMatt Spinler ] 30070311203SMatt Spinler 30170311203SMatt Spinler } 30270311203SMatt Spinler] 30370311203SMatt Spinler 30470311203SMatt Spinler``` 30570311203SMatt Spinler 30670311203SMatt SpinlerThe above example shows that on system 'system1', the FRU at location P1-C1 30770311203SMatt Spinlerwill be called out with a priority of high, and the FRU at P1 with a priority 30870311203SMatt Spinlerof low. On every other system, the maintenance procedure SVCDOCS is called 30970311203SMatt Spinlerout. 31070311203SMatt Spinler 31170311203SMatt Spinler#### Callouts example based on an AdditionalData field 31270311203SMatt Spinler 31370311203SMatt Spinler``` 31470311203SMatt Spinler"CalloutsUsingAD": 31570311203SMatt Spinler{ 31670311203SMatt Spinler "ADName": "PROC_NUM", 31770311203SMatt Spinler "CalloutsWithTheirADValues": 31870311203SMatt Spinler [ 31970311203SMatt Spinler { 32070311203SMatt Spinler "ADValue": "0", 32170311203SMatt Spinler "Callouts": 32270311203SMatt Spinler [ 32370311203SMatt Spinler { 32470311203SMatt Spinler "CalloutList": 32570311203SMatt Spinler [ 32670311203SMatt Spinler { 32770311203SMatt Spinler "Priority": "high", 32870311203SMatt Spinler "LocCode": "P1-C5" 32970311203SMatt Spinler } 33070311203SMatt Spinler ] 33170311203SMatt Spinler } 33270311203SMatt Spinler ] 33370311203SMatt Spinler }, 33470311203SMatt Spinler { 33570311203SMatt Spinler "ADValue": "1", 33670311203SMatt Spinler "Callouts": 33770311203SMatt Spinler [ 33870311203SMatt Spinler { 33970311203SMatt Spinler "CalloutList": 34070311203SMatt Spinler [ 34170311203SMatt Spinler { 34270311203SMatt Spinler "Priority": "high", 34370311203SMatt Spinler "LocCode": "P1-C6" 34470311203SMatt Spinler } 34570311203SMatt Spinler ] 34670311203SMatt Spinler } 34770311203SMatt Spinler ] 34870311203SMatt Spinler } 34970311203SMatt Spinler ] 35070311203SMatt Spinler} 35170311203SMatt Spinler 35270311203SMatt Spinler``` 35370311203SMatt Spinler 35470311203SMatt SpinlerThis example shows that the callouts were selected based on the 'PROC_NUM' 35570311203SMatt SpinlerAdditionalData field. When PROC_NUM was 0, the FRU at P1-C5 was called out. 35670311203SMatt SpinlerWhen it was 1, P1-C6 was called out. Note that the same 'Callouts' array is 35770311203SMatt Spinlerused as in the previous example, so these callouts can also depend on the 35870311203SMatt Spinlersystem type. 35970311203SMatt Spinler 36070311203SMatt Spinler#### CalloutType 36170311203SMatt SpinlerThis field can be used to modify the failing component type field in the 36270311203SMatt Spinlercallout when the default doesn\'t fit: 36370311203SMatt Spinler 36470311203SMatt Spinler``` 36570311203SMatt Spinler{ 36670311203SMatt Spinler 36770311203SMatt Spinler "Priority": "high", 36870311203SMatt Spinler "Procedure": "FIXIT22" 36970311203SMatt Spinler "CalloutType": "config_procedure" 37070311203SMatt Spinler} 37170311203SMatt Spinler``` 37270311203SMatt Spinler 37370311203SMatt SpinlerThe defaults are: 37470311203SMatt Spinler- Normal hardware FRU: hardware_fru 37570311203SMatt Spinler- Symbolic FRU: symbolic_fru 37670311203SMatt Spinler- Procedure: maint_procedure 377