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 }, 345 346 "docMessage": 347 { 348 "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.", 349 "type": "string", 350 "examples": [ 351 {"Message": "The code update from level %1 to %2 failed" } 352 ] 353 }, 354 355 "docMessageArgSources": 356 { 357 "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.", 358 "type": "array", 359 "items": 360 { 361 "type": "string", 362 "enum": ["SRCWord6", "SRCWord7", "SRCWord8", "SRCWord9"] 363 }, 364 "additionalItems": false 365 }, 366 367 "symptomID": 368 { 369 "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).", 370 "type": "array", 371 "items": 372 { 373 "type": "string", 374 "enum": ["SRCWord3", "SRCWord4", "SRCWord5", "SRCWord6", 375 "SRCWord7", "SRCWord8", "SRCWord9"] 376 }, 377 "minItems": 1, 378 "maxItems": 8, 379 "uniqueItems": true, 380 381 "examples": [ 382 ["SRCWord3", "SRCWord6"] 383 ] 384 }, 385 386 "srcWords6To9": 387 { 388 "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.", 389 "type": "object", 390 "patternProperties": 391 { 392 "^[6-9]$": 393 { 394 "type": "object", 395 "properties": 396 { 397 "Description": 398 { 399 "description": "What the value in the field represents.", 400 "type": "string" 401 }, 402 "AdditionalDataPropSource": 403 { 404 "description": "Which AdditionalData property key to get the data from.", 405 "type": "string" 406 } 407 }, 408 409 "additionalProperties": false 410 }, 411 412 "examples": 413 { 414 "SRCWords6To9": 415 { 416 "6": 417 { 418 "Description": "Failing PSU number", 419 "AdditionalDataPropSource": "PSU_NUM" 420 } 421 } 422 } 423 }, 424 "additionalProperties": false 425 }, 426 427 "adName": 428 { 429 "description": "The name of the AdditionalData entry to use to index into the callout tables.", 430 "type": "string" 431 }, 432 433 "adValue": 434 { 435 "description": "The value for the AdditionalData entry specified by ADName that indexes into the callout tables.", 436 "type": "string" 437 }, 438 439 "locationCode": 440 { 441 "description": "A location code - the segment after the 'UTMS-' prefix. (e.g. P1-C2)", 442 "type": "string" 443 }, 444 445 "priority": 446 { 447 "description": "The callout priority. See the PEL spec for priority definitions.", 448 "type": "string", 449 "enum": ["high", "medium", "low", "medium_group_a", 450 "medium_group_b", "medium_group_c"] 451 }, 452 453 "symbolicFRU": 454 { 455 "description": "The symbolic FRU callout.", 456 "type": "string", 457 "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"] 458 }, 459 460 "symbolicFRUTrusted": 461 { 462 "description": "The symbolic FRU callout with a trusted location code. (Can light LEDs).", 463 "ref": "#/definitions/symbolicFRU" 464 }, 465 466 "procedure": 467 { 468 "description": "The maintenance procedure callout.", 469 "type": "string", 470 "enum": ["bmc_code", "next_level_support", "sbe_code", "fsi_path", "power_overcurrent", "find_sue_root_cause"] 471 }, 472 473 "useInventoryLocCode": 474 { 475 "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.", 476 "type": "boolean" 477 }, 478 479 "calloutList": 480 { 481 "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.", 482 "type": "array", 483 "items": 484 { 485 "type": "object", 486 "properties": 487 { 488 "Priority": {"$ref": "#/definitions/priority" }, 489 "LocCode": {"$ref": "#/definitions/locationCode" }, 490 "SymbolicFRU": {"$ref": "#/definitions/symbolicFRU" }, 491 "SymbolicFRUTrusted": {"$ref": "#/definitions/symbolicFRUTrusted" }, 492 "Procedure": {"$ref": "#/definitions/procedure" }, 493 "UseInventoryLocCode": {"$ref": "#/definitions/useInventoryLocCode" } 494 }, 495 "additionalProperties": false, 496 "required": ["Priority"], 497 498 "oneOf": 499 [ 500 { 501 "allOf": 502 [ 503 { "required": ["LocCode"] }, 504 { "not": { "required": ["SymbolicFRU"] }}, 505 { "not": { "required": ["SymbolicFRUTrusted"] }}, 506 { "not": { "required": ["Procedure"] }}, 507 { "not": { "required": ["UseInventoryLocCode"] }} 508 ] 509 }, 510 { 511 512 "allOf": 513 [ 514 { "required": ["SymbolicFRU"] }, 515 { "not": { "required": ["SymbolicFRUTrusted"] }}, 516 { "not": { "required": ["Procedure"] }}, 517 { "not": { "required": ["UseInventoryLocCode"] }} 518 ] 519 }, 520 521 { 522 "allOf": 523 [ 524 { "required": ["SymbolicFRUTrusted", "LocCode"] }, 525 { "not": { "required": ["SymbolicFRU"] }}, 526 { "not": { "required": ["Procedure"] }}, 527 { "not": { "required": ["UseInventoryLocCode"] }} 528 ] 529 }, 530 531 { 532 "allOf": 533 [ 534 { "required": ["SymbolicFRUTrusted", "UseInventoryLocCode"] }, 535 { "not": { "required": ["SymbolicFRU"] }}, 536 { "not": { "required": ["Procedure"] }}, 537 { "not": { "required": ["LocCode"] }} 538 ] 539 }, 540 541 { 542 "allOf": 543 [ 544 { "required": ["Procedure"] }, 545 { "not": { "required": ["SymbolicFRU"] }}, 546 { "not": { "required": ["SymbolicFRUTrusted"] }}, 547 { "not": { "required": ["LocCode"] }}, 548 { "not": { "required": ["UseInventoryLocCode"] }} 549 ] 550 } 551 ] 552 }, 553 "minItems": 1, 554 "maxItems": 10, 555 556 "examples": 557 [ 558 { 559 "Priority": "high", 560 "LocCode": "P1" 561 }, 562 { 563 "Priority": "medium", 564 "LocCode": "P2", 565 "SymbolicFRU": "PROCFRU" 566 }, 567 { 568 "Priority": "low", 569 "Procedure": "SVCDOCS" 570 } 571 ] 572 }, 573 574 "system": 575 { 576 "description": "The system type string, as specified by entity manger. It is used to index into different sections of the JSON.", 577 "type": "string", 578 "minLength": 1 579 }, 580 581 "callouts": 582 { 583 "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.", 584 "type": "array", 585 "items": 586 { 587 "type": "object", 588 589 "properties": 590 { 591 "System": {"$ref": "#/definitions/system" }, 592 "CalloutList": {"$ref": "#/definitions/calloutList" } 593 }, 594 "required": ["CalloutList"], 595 "additionalProperties": false 596 }, 597 "minItems": 1, 598 "maxItems": 10, 599 600 "examples": 601 [ 602 [ 603 { 604 "System": "system1", 605 "CalloutList": [{"Priority": "high", "LocCode": "P1"}] 606 }, 607 { 608 "CalloutList": [{"Priority": "high", "Procedure": "NEXTLVL"}] 609 } 610 ] 611 ] 612 }, 613 614 "calloutsWithTheirADValues": 615 { 616 "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.", 617 "type": "array", 618 619 "items": 620 { 621 "type": "object", 622 "properties": 623 { 624 "ADValue": {"$ref": "#/definitions/adValue" }, 625 "Callouts": {"$ref": "#/definitions/callouts" } 626 }, 627 "additionalProperties": false, 628 "required": ["ADValue", "Callouts"] 629 }, 630 "minItems": 1, 631 632 "examples": 633 [ 634 [ 635 { 636 "ADValue": "0", 637 "Callouts": 638 [ 639 { 640 "CalloutList": [{"Priority": "high", "LocCode": "P1"}] 641 } 642 ] 643 }, 644 { 645 "ADValue": "1", 646 "Callouts": 647 [ 648 { 649 "CalloutList": [{"Priority": "high", "LocCode": "P2"}] 650 } 651 ] 652 } 653 ] 654 ] 655 }, 656 657 "calloutsUsingAD": 658 { 659 "description": "This contains the callouts that can be specified based on a value in the AdditionalData property..", 660 "type": "object", 661 662 "properties": 663 { 664 "ADName": {"$ref": "#/definitions/adName" }, 665 "CalloutsWithTheirADValues": 666 {"$ref": "#/definitions/calloutsWithTheirADValues" } 667 }, 668 "additionalProperties": false, 669 "required": ["ADName", "CalloutsWithTheirADValues"], 670 671 "examples": 672 [ 673 { 674 "ADName": "PROC_NUM", 675 "CalloutsWithTheirADValues": 676 [ 677 { 678 "ADValue": "0", 679 "Callouts": 680 [ 681 { 682 "CalloutList": [{"Priority": "high", "LocCode": "P1"}] 683 } 684 ] 685 }, 686 { 687 "ADValue": "1", 688 "Callouts": 689 [ 690 { 691 "CalloutList": [{"Priority": "high", "LocCode": "P2"}] 692 } 693 ] 694 } 695 ] 696 } 697 ] 698 } 699 } 700} 701