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