1{ 2 "title": "PEL message registry schema", 3 "$id": "http://github.com/openbmc/phosphor-logging/extensions/openpower-pels/registry/schema/schema.json", 4 "description": "This schema describes JSON used for creating PELs from OpenBMC event logs.", 5 "type": "object", 6 7 "properties": 8 { 9 "PELs": 10 { 11 "title": "This is an array of entries that specify PEL fields for event logs", 12 "$ref": "#/definitions/pels" 13 } 14 }, 15 16 "additionalProperties": false, 17 "minItems": 1, 18 "uniqueItems": true, 19 20 "definitions": 21 { 22 "pels": 23 { 24 "description": "Each entry in this array is for converting an event log to a PEL", 25 "type": "array", 26 "items": 27 { 28 "description": "The schema for a single event log registry entry", 29 "type": "object", 30 "properties": 31 { 32 "Name": {"$ref": "#/definitions/errorName" }, 33 34 "SRC": {"$ref": "#/definitions/src" }, 35 36 "Subsystem": {"$ref": "#/definitions/subsystem" }, 37 38 "Severity": {"$ref": "#/definitions/severity" }, 39 40 "MfgSeverity": {"$ref": "#/definitions/mfgSeverity" }, 41 42 "EventScope": {"$ref": "#/definitions/eventScope" }, 43 44 "EventType": {"$ref": "#/definitions/eventType" }, 45 46 "ActionFlags": {"$ref": "#/definitions/actionFlags" }, 47 48 "MfgActionFlags": {"$ref": "#/definitions/mfgActionFlags" }, 49 50 "Documentation": {"$ref": "#/definitions/documentation" }, 51 52 "ComponentID": {"$ref": "#/definitions/componentID" }, 53 54 "CalloutsUsingAD": {"$ref": "#/definitions/calloutsUsingAD"}, 55 56 "Callouts": {"$ref": "#/definitions/callouts"} 57 }, 58 59 "required": ["Name", "SRC", "Subsystem", "Documentation"], 60 "additionalProperties": false, 61 62 "not": 63 { 64 "required": ["CalloutsUsingAD", "Callouts"] 65 } 66 } 67 }, 68 69 "errorName": 70 { 71 "description": "The 'Message' property of an OpenBMC event log", 72 "type": "string" 73 }, 74 75 "componentID": 76 { 77 "description": "The component ID of the PEL creator, in the form 0xYY00. For BD SRCs, this is optional and if not present the component ID will be taken from the upper byte of the reason code.", 78 "type": "string", 79 "pattern": "^0x[0-9a-fA-F]{2}00$" 80 }, 81 82 "src": 83 { 84 "description": "Contains fields describing the primary SRC embedded in the PEL", 85 "type": "object", 86 87 "properties": 88 { 89 "Type": {"$ref": "#/definitions/srcType" }, 90 91 "ReasonCode": {"$ref": "#/definitions/reasonCode" }, 92 93 "SymptomIDFields": {"$ref": "#/definitions/symptomID" }, 94 95 "Words6To9": {"$ref": "#/definitions/srcWords6To9" }, 96 97 "PowerFault": {"$ref": "#/definitions/powerFault" } 98 }, 99 100 "required": ["ReasonCode", "Words6To9"], 101 "additionalProperties": false 102 }, 103 104 "documentation": 105 { 106 "description": "This contains event documentation that will be used by tools and parsers.", 107 "type": "object", 108 109 "properties": 110 { 111 "Message": {"$ref": "#/definitions/docMessage" }, 112 113 "MessageArgSources": {"$ref": "#/definitions/docMessageArgSources" }, 114 115 "Description": {"$ref": "#/definitions/docDescription" }, 116 117 "Notes": {"$ref": "#/definitions/docNotes" } 118 119 }, 120 "additionalProperties": false, 121 "required": ["Message", "Description"] 122 }, 123 124 "srcType": 125 { 126 "description": "The first byte of the SRC ASCII string. Optional and defaults to BD. The '11' SRC is only to be used for events related to power.", 127 "type": "string", 128 "enum": ["BD", "11"] 129 }, 130 131 "docNotes": 132 { 133 "description": "Any notes/comments about the error. An array of strings for manual line wrapping. Optional.", 134 "type": "array", 135 "items": 136 { 137 "description": "Notes", 138 "type": "string" 139 } 140 }, 141 142 "reasonCode": 143 { 144 "description": "String representation of the 2 byte reason code, like 0xABCD. The reason code is the 2nd half of the 8 character SRC ASCII String field, such as B1FFABCD.", 145 "type": "string", 146 "pattern": "^0x[0-9a-fA-F]{4}$", 147 148 "examples": [ 149 "0x3355" 150 ] 151 }, 152 153 "subsystem": 154 { 155 "description": "PEL subsystem enumeration. See the PEL spec for more detailed definitions.", 156 "type": "string", 157 "enum": ["processor", "processor_fru", "processor_chip", 158 "processor_unit", "processor_bus", 159 160 "memory", "memory_ctlr", "memory_bus", "memory_dimm", 161 "memory_fru", "external_cache", 162 163 "io", "io_hub", "io_bridge", "io_bus", "io_processor", 164 "io_hub_other", "phb", 165 166 "io_adapter", "io_adapter_comm", "io_device", 167 "io_device_dasd", "io_external_general", 168 "io_external_workstation", "io_storage_mezz", 169 170 "cec_hardware", "cec_sp_a", "cec_sp_b", 171 "cec_node_controller", "cec_vpd", 172 "cec_i2c", "cec_chip_iface", "cec_clocks", "cec_op_panel", 173 "cec_tod", "cec_storage_device", "cec_sp_hyp_iface", 174 "cec_service_network", "cec_sp_hostboot_iface", 175 176 "power", "power_supply", "power_control_hw", "power_fans", 177 "power_sequencer", 178 179 "others", "other_hmc", "other_test_tool", "other_media", 180 "other_multiple_subsystems", "other_na", "other_info_src", 181 182 "surv_hyp_lost_sp", "surv_sp_lost_hyp", "surv_sp_lost_hmc", 183 "surv_hmc_lost_lpar", "surv_hmc_lost_bpa", 184 "surv_hmc_lost_hmc", 185 186 "platform_firmware", "bmc_firmware", "hyp_firmware", 187 "partition_firmware", "slic_firmware", "spcn_firmware", 188 "bulk_power_firmware_side_a", "hmc_code_firmware", 189 "bulk_power_firmware_side_b", "virtual_sp", "hostboot", 190 "occ", 191 192 "software", "os_software", "xpf_software", "app_software", 193 194 "ext_env", "input_power_source", "ambient_temp", 195 "user_error", "corrosion"] 196 }, 197 198 "systemAndSeverity": 199 { 200 "description": "A severity entry that has an optional system type qualifier. Used when the severity needs to be based on the system type.", 201 "type": "object", 202 "properties": 203 { 204 "System": { "$ref": "#/definitions/system" }, 205 "SevValue": { "$ref": "#/definitions/severityTypes" } 206 }, 207 "additionalProperties": false, 208 "required": ["SevValue"] 209 }, 210 211 "severity": 212 { 213 "description": "PEL severity field. Optional. If not provided, it will use the event log severity. It can either be an enum of the severity value, or an array of them that is based on system type, where an entry without a system type acts as the catch all.", 214 "oneOf": 215 [ 216 { 217 "$ref": "#/definitions/severityTypes" 218 }, 219 { 220 "type": "array", 221 "items": 222 { 223 "$ref": "#/definitions/systemAndSeverity" 224 }, 225 "minItems": 1, 226 "uniqueItems": true 227 } 228 ], 229 230 "examples": 231 [ 232 "unrecoverable", 233 234 [ 235 { 236 "System": "systemA", 237 "SevValue": "predictive" 238 }, 239 { 240 "SevValue": "unrecoverable" 241 } 242 ] 243 ] 244 245 }, 246 247 "severityTypes": 248 { 249 "description": "PEL severity enumeration. See the PEL spec for more detailed definitions.", 250 "type": "string", 251 252 "enum": ["non_error", 253 254 "recovered", 255 256 "predictive", "predictive_degraded_perf", 257 "predictive_reboot", "predictive_reboot_degraded", 258 "predictive_redundancy_loss", 259 260 "unrecoverable", "unrecoverable_degraded_perf", 261 "unrecoverable_redundancy_loss", 262 "unrecoverable_redundancy_loss_perf", 263 "unrecoverable_loss_of_function", 264 265 "critical", "critical_system_term", 266 "critical_imminent_failure", 267 "critical_partition_term", 268 "critical_partition_imminent_failure", 269 270 "diagnostic_error", "diagnostic_error_incorrect_results", 271 272 "symptom_recovered", "symptom_predictive", 273 "symptom_unrecoverable", "symptom_critical", 274 "symptom_diag_err"] 275 }, 276 277 "mfgSeverity": 278 { 279 "description": "The PEL severity to use in manufacturing reporting mode", 280 "$ref": "#/definitions/severity" 281 }, 282 283 "eventScope": 284 { 285 "description": "The event scope PEL field. Optional and defaults to entire_platform", 286 "type": "string", 287 "enum": ["entire_platform", "single_partition", "multiple_partitions", 288 "possibly_multiple_platforms"] 289 }, 290 291 "eventType": 292 { 293 "description": "The event type PEL field. Optional and defaults to na", 294 "type": "string", 295 "enum": ["na", "misc_information_only", "tracing_event", 296 "dump_notification", "env_normal"] 297 }, 298 299 "powerFault": 300 { 301 "description": "The Power Fault SRC field (bit 6 in byte 1 of header). Optional and defaults to false", 302 "type": "boolean" 303 }, 304 305 "actionFlags": 306 { 307 "description": "The action flags Private Header PEL field", 308 "type": "array", 309 "items": 310 { 311 "description": "List of action flags", 312 "type": "string", 313 "enum": ["service_action", "hidden", "report", "dont_report", 314 "call_home", "isolation_incomplete", "termination"] 315 } 316 }, 317 318 "mfgActionFlags": 319 { 320 "description": "The PEL action flags to use in manufacturing reporting mode", 321 "$ref": "#/definitions/actionFlags" 322 }, 323 324 "docDescription": 325 { 326 "description": "This is a higher level description of the error. It is required by the Redfish schema to generate a Redfish message entry, but is not used in Redfish or PEL output.", 327 "type": "string" 328 }, 329 330 "docMessage": 331 { 332 "description": "The error message. This will show up in parsed PELs, and in the Redfish event logs. It can contain placeholders for numeric values using %1, %2, etc, that come from the SRC words 6-9 as defined by the MessageArgSources property.", 333 "type": "string", 334 "examples": [ 335 {"Message": "The code update from level %1 to %2 failed" } 336 ] 337 }, 338 339 "docMessageArgSources": 340 { 341 "description": "The SRC word 6-9 to use as the source of the numeric arguments that will be substituted into any placeholder in the Message field. Only required if there are arguments to substitute.", 342 "type": "array", 343 "items": 344 { 345 "type": "string", 346 "enum": ["SRCWord6", "SRCWord7", "SRCWord8", "SRCWord9"] 347 }, 348 "additionalItems": false 349 }, 350 351 "symptomID": 352 { 353 "description": "Defines a custom Symptom ID, to be appended to the ASCII string word and separated by underscores. The maximum size of the Symptom ID field is 80 characters. The default is ASCIISTRING_SRCWord3 (e.g. B1103500_12345678).", 354 "type": "array", 355 "items": 356 { 357 "type": "string", 358 "enum": ["SRCWord3", "SRCWord4", "SRCWord5", "SRCWord6", 359 "SRCWord7", "SRCWord8", "SRCWord9"] 360 }, 361 "minItems": 1, 362 "maxItems": 8, 363 "uniqueItems": true, 364 365 "examples": [ 366 ["SRCWord3", "SRCWord6"] 367 ] 368 }, 369 370 "srcWords6To9": 371 { 372 "description": "This details what the user defined SRC hex words (6-9) mean, and which AdditionalData properties to get them from. These will be shown in the PEL parser output. Must be present, but can be empty.", 373 "type": "object", 374 "patternProperties": 375 { 376 "^[6-9]$": 377 { 378 "type": "object", 379 "properties": 380 { 381 "Description": 382 { 383 "description": "What the value in the field represents.", 384 "type": "string" 385 }, 386 "AdditionalDataPropSource": 387 { 388 "description": "Which AdditionalData property key to get the data from.", 389 "type": "string" 390 } 391 }, 392 393 "additionalProperties": false 394 }, 395 396 "examples": 397 { 398 "SRCWords6To9": 399 { 400 "6": 401 { 402 "Description": "Failing PSU number", 403 "AdditionalDataPropSource": "PSU_NUM" 404 } 405 } 406 } 407 }, 408 "additionalProperties": false 409 }, 410 411 "adName": 412 { 413 "description": "The name of the AdditionalData entry to use to index into the callout tables.", 414 "type": "string" 415 }, 416 417 "adValue": 418 { 419 "description": "The value for the AdditionalData entry specified by ADName that indexes into the callout tables.", 420 "type": "string" 421 }, 422 423 "locationCode": 424 { 425 "description": "A location code - the segment after the 'UTMS-' prefix. (e.g. P1-C2)", 426 "type": "string" 427 }, 428 429 "priority": 430 { 431 "description": "The callout priority. See the PEL spec for priority definitions.", 432 "type": "string", 433 "enum": ["high", "medium", "low", "medium_group_a", 434 "medium_group_b", "medium_group_c"] 435 }, 436 437 "symbolicFRU": 438 { 439 "description": "The symbolic FRU callout.", 440 "type": "string", 441 "enum": ["service_docs", "pwrsply", "air_mover", "pgood_part", "usb_pgood", "ambient_temp", "ambient_temp_back", "ambient_perf_loss", "ac_module"] 442 }, 443 444 "symbolicFRUTrusted": 445 { 446 "description": "The symbolic FRU callout with a trusted location code. (Can light LEDs).", 447 "ref": "#/definitions/symbolicFRU" 448 }, 449 450 "procedure": 451 { 452 "description": "The maintenance procedure callout.", 453 "type": "string", 454 "enum": ["no_vpd_for_fru", "bmc_code"] 455 }, 456 457 "useInventoryLocCode": 458 { 459 "description": "Used along with SymbolicFRUTrusted to specify that the location code to use with the symbolic FRU is to be taken from the passed in CALLOUT_INVENTORY_PATH callout rather than being specified with LocCode.", 460 "type": "boolean" 461 }, 462 463 "calloutList": 464 { 465 "description": "The list of FRU callouts to add to a PEL. If just LocCode is specified, it is a normal hardware FRU callout. If Procedure is specified, it is a procedure callout. If SymbolicFRU or SymbolicFRUTrusted are specified, it is a Symbolic FRU callout. SymbolicFRUTrusted also requires LocCode.", 466 "type": "array", 467 "items": 468 { 469 "type": "object", 470 "properties": 471 { 472 "Priority": {"$ref": "#/definitions/priority" }, 473 "LocCode": {"$ref": "#/definitions/locationCode" }, 474 "SymbolicFRU": {"$ref": "#/definitions/symbolicFRU" }, 475 "SymbolicFRUTrusted": {"$ref": "#/definitions/symbolicFRUTrusted" }, 476 "Procedure": {"$ref": "#/definitions/procedure" }, 477 "UseInventoryLocCode": {"$ref": "#/definitions/useInventoryLocCode" } 478 }, 479 "additionalProperties": false, 480 "required": ["Priority"], 481 482 "oneOf": 483 [ 484 { 485 "allOf": 486 [ 487 { "required": ["LocCode"] }, 488 { "not": { "required": ["SymbolicFRU"] }}, 489 { "not": { "required": ["SymbolicFRUTrusted"] }}, 490 { "not": { "required": ["Procedure"] }}, 491 { "not": { "required": ["UseInventoryLocCode"] }} 492 ] 493 }, 494 { 495 496 "allOf": 497 [ 498 { "required": ["SymbolicFRU"] }, 499 { "not": { "required": ["SymbolicFRUTrusted"] }}, 500 { "not": { "required": ["Procedure"] }}, 501 { "not": { "required": ["UseInventoryLocCode"] }} 502 ] 503 }, 504 505 { 506 "allOf": 507 [ 508 { "required": ["SymbolicFRUTrusted", "LocCode"] }, 509 { "not": { "required": ["SymbolicFRU"] }}, 510 { "not": { "required": ["Procedure"] }}, 511 { "not": { "required": ["UseInventoryLocCode"] }} 512 ] 513 }, 514 515 { 516 "allOf": 517 [ 518 { "required": ["SymbolicFRUTrusted", "UseInventoryLocCode"] }, 519 { "not": { "required": ["SymbolicFRU"] }}, 520 { "not": { "required": ["Procedure"] }}, 521 { "not": { "required": ["LocCode"] }} 522 ] 523 }, 524 525 { 526 "allOf": 527 [ 528 { "required": ["Procedure"] }, 529 { "not": { "required": ["SymbolicFRU"] }}, 530 { "not": { "required": ["SymbolicFRUTrusted"] }}, 531 { "not": { "required": ["LocCode"] }}, 532 { "not": { "required": ["UseInventoryLocCode"] }} 533 ] 534 } 535 ] 536 }, 537 "minItems": 1, 538 "maxItems": 10, 539 540 "examples": 541 [ 542 { 543 "Priority": "high", 544 "LocCode": "P1" 545 }, 546 { 547 "Priority": "medium", 548 "LocCode": "P2", 549 "SymbolicFRU": "PROCFRU" 550 }, 551 { 552 "Priority": "low", 553 "Procedure": "SVCDOCS" 554 } 555 ] 556 }, 557 558 "system": 559 { 560 "description": "The system type string, as specified by entity manger. It is used to index into different sections of the JSON.", 561 "type": "string", 562 "minLength": 1 563 }, 564 565 "callouts": 566 { 567 "description": "This contains callouts that can vary based on system type. Each entry contains an optional System property and a required CalloutList property. If the System property is left out it indicates that the CalloutList callouts are valid for every system type, unless there is another Callouts entry that has a matching System property, in which case that entry is valid.", 568 "type": "array", 569 "items": 570 { 571 "type": "object", 572 573 "properties": 574 { 575 "System": {"$ref": "#/definitions/system" }, 576 "CalloutList": {"$ref": "#/definitions/calloutList" } 577 }, 578 "required": ["CalloutList"], 579 "additionalProperties": false 580 }, 581 "minItems": 1, 582 "maxItems": 10, 583 584 "examples": 585 [ 586 [ 587 { 588 "System": "system1", 589 "CalloutList": [{"Priority": "high", "LocCode": "P1"}] 590 }, 591 { 592 "CalloutList": [{"Priority": "high", "Procedure": "NEXTLVL"}] 593 } 594 ] 595 ] 596 }, 597 598 "calloutsWithTheirADValues": 599 { 600 "description": "This contains callouts along with the AdditionalData value used to select an entry into the callout list. The AdditionalData entry was specified by ADName in the CalloutsUsingAD parent entry.", 601 "type": "array", 602 603 "items": 604 { 605 "type": "object", 606 "properties": 607 { 608 "ADValue": {"$ref": "#/definitions/adValue" }, 609 "Callouts": {"$ref": "#/definitions/callouts" } 610 }, 611 "additionalProperties": false, 612 "required": ["ADValue", "Callouts"] 613 }, 614 "minItems": 1, 615 616 "examples": 617 [ 618 [ 619 { 620 "ADValue": "0", 621 "Callouts": 622 [ 623 { 624 "CalloutList": [{"Priority": "high", "LocCode": "P1"}] 625 } 626 ] 627 }, 628 { 629 "ADValue": "1", 630 "Callouts": 631 [ 632 { 633 "CalloutList": [{"Priority": "high", "LocCode": "P2"}] 634 } 635 ] 636 } 637 ] 638 ] 639 }, 640 641 "calloutsUsingAD": 642 { 643 "description": "This contains the callouts that can be specified based on a value in the AdditionalData property..", 644 "type": "object", 645 646 "properties": 647 { 648 "ADName": {"$ref": "#/definitions/adName" }, 649 "CalloutsWithTheirADValues": 650 {"$ref": "#/definitions/calloutsWithTheirADValues" } 651 }, 652 "additionalProperties": false, 653 "required": ["ADName", "CalloutsWithTheirADValues"], 654 655 "examples": 656 [ 657 { 658 "ADName": "PROC_NUM", 659 "CalloutsWithTheirADValues": 660 [ 661 { 662 "ADValue": "0", 663 "Callouts": 664 [ 665 { 666 "CalloutList": [{"Priority": "high", "LocCode": "P1"}] 667 } 668 ] 669 }, 670 { 671 "ADValue": "1", 672 "Callouts": 673 [ 674 { 675 "CalloutList": [{"Priority": "high", "LocCode": "P2"}] 676 } 677 ] 678 } 679 ] 680 } 681 ] 682 } 683 } 684} 685