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