summaryrefslogtreecommitdiffstats
path: root/extensions/openpower-pels/registry/schema/schema.json
blob: f41d425180c8bae4ab82cd4a2eb944fe2e757d43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
{
    "title": "PEL message registry schema",
    "$id": "http://github.com/openbmc/phosphor-logging/extensions/openpower-pels/registry/schema/schema.json",
    "description": "This schema describes JSON used for creating PELs from OpenBMC event logs.",
    "type": "object",

    "properties":
    {
        "PELs":
        {
            "title": "This is an array of entries that specify PEL fields for event logs",
            "$ref": "#/definitions/pels"
        }
    },

    "additionalProperties": false,
    "minItems": 1,
    "uniqueItems": true,

    "definitions":
    {
        "pels":
        {
            "description": "Each entry in this array is for converting an event log to a PEL",
            "type": "array",
            "items":
            {
                "description": "The schema for a single event log registry entry",
                "type": "object",
                "properties":
                {
                    "Name": {"$ref": "#/definitions/errorName" },

                    "SRC": {"$ref": "#/definitions/src" },

                    "Subsystem": {"$ref": "#/definitions/subsystem" },

                    "Severity": {"$ref": "#/definitions/severity" },

                    "MfgSeverity": {"$ref": "#/definitions/mfgSeverity" },

                    "EventScope": {"$ref": "#/definitions/eventScope" },

                    "EventType": {"$ref": "#/definitions/eventType" },

                    "ActionFlags": {"$ref": "#/definitions/actionFlags" },

                    "MfgActionFlags": {"$ref": "#/definitions/mfgActionFlags" },

                    "Documentation": {"$ref": "#/definitions/documentation" },

                    "ComponentID": {"$ref": "#/definitions/componentID" }
                },

                "required": ["Name", "SRC", "Subsystem", "Documentation"],
                "additionalProperties": false
            }
        },

        "errorName":
        {
            "description": "The 'Message' property of an OpenBMC event log",
            "type": "string"
        },

        "componentID":
        {
            "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.",
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{2}00$"
        },

        "src":
        {
            "description": "Contains fields describing the primary SRC embedded in the PEL",
            "type": "object",

            "properties":
            {
                "Type": {"$ref": "#/definitions/srcType" },

                "ReasonCode": {"$ref": "#/definitions/reasonCode" },

                "SymptomIDFields": {"$ref": "#/definitions/symptomID" },

                "Words6To9": {"$ref": "#/definitions/srcWords6To9" },

                "PowerFault": {"$ref": "#/definitions/powerFault" }
            },

            "required": ["ReasonCode", "Words6To9"],
            "additionalProperties": false
        },

        "documentation":
        {
            "description": "This contains event documentation that will be used by tools and parsers.",
            "type": "object",

            "properties":
            {
                "Message": {"$ref": "#/definitions/docMessage" },

                "MessageArgSources": {"$ref": "#/definitions/docMessageArgSources" },

                "Description": {"$ref": "#/definitions/docDescription" },

                "Notes": {"$ref": "#/definitions/docNotes" }

            },
            "additionalProperties": false,
            "required": ["Message", "Description"]
        },

        "srcType":
        {
            "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.",
            "type": "string",
            "enum": ["BD", "11"]
        },

        "docNotes":
        {
            "description": "Any notes/comments about the error. An array of strings for manual line wrapping. Optional.",
            "type": "array",
            "items":
            {
                "description": "Notes",
                "type": "string"
            }
        },

        "reasonCode":
        {
            "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.",
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{4}$",

            "examples": [
                "0x3355"
            ]
        },

        "subsystem":
        {
            "description": "PEL subsystem enumeration.  See the PEL spec for more detailed definitions.",
            "type": "string",
            "enum": ["processor", "processor_fru", "processor_chip",
                     "processor_unit", "processor_bus",

                     "memory", "memory_ctlr", "memory_bus", "memory_dimm",
                     "memory_fru", "external_cache",

                     "io", "io_hub", "io_bridge", "io_bus", "io_processor",
                     "io_hub_other", "phb",

                     "io_adapter", "io_adapter_comm", "io_device",
                     "io_device_dasd", "io_external_general",
                     "io_external_workstation", "io_storage_mezz",

                     "cec_hardware", "cec_sp_a", "cec_sp_b",
                     "cec_node_controller", "cec_vpd",
                     "cec_i2c", "cec_chip_iface", "cec_clocks", "cec_op_panel",
                     "cec_tod", "cec_storage_device", "cec_sp_hyp_iface",
                     "cec_service_network", "cec_sp_hostboot_iface",

                     "power", "power_supply", "power_control_hw", "power_fans",
                     "power_sequencer",

                     "others", "other_hmc", "other_test_tool", "other_media",
                     "other_multiple_subsystems", "other_na", "other_info_src",

                     "surv_hyp_lost_sp", "surv_sp_lost_hyp", "surv_sp_lost_hmc",
                     "surv_hmc_lost_lpar", "surv_hmc_lost_bpa",
                     "surv_hmc_lost_hmc",

                     "platform_firmware", "bmc_firmware", "hyp_firmware",
                     "partition_firmware", "slic_firmware", "spcn_firmware",
                     "bulk_power_firmware_side_a", "hmc_code_firmware",
                     "bulk_power_firmware_side_b", "virtual_sp", "hostboot",
                     "occ",

                     "software", "os_software", "xpf_software", "app_software",

                     "ext_env", "input_power_source", "ambient_temp",
                     "user_error", "corrosion"]
        },

        "severity":
        {
            "description": "PEL severity enumeration.  Optional.  If not provided, will use the event log severity.  See the PEL spec for more detailed definitions.",
            "type": "string",

            "enum": ["non_error",

                     "recovered",

                     "predictive", "predictive_degraded_perf",
                     "predictive_reboot", "predictive_reboot_degraded",
                     "predictive_redundancy_loss",

                     "unrecoverable", "unrecoverable_degraded_perf",
                     "unrecoverable_redundancy_loss",
                     "unrecoverable_redundancy_loss_perf",
                     "unrecoverable_loss_of_function",

                     "critical", "critical_system_term",
                     "critical_imminent_failure",
                     "critical_partition_term",
                     "critical_partition_imminent_failure",

                     "diagnostic_error", "diagnostic_error_incorrect_results",

                     "symptom_recovered", "symptom_predictive",
                     "symptom_unrecoverable", "symptom_critical",
                     "symptom_diag_err"]
        },

        "mfgSeverity":
        {
            "description": "The PEL severity to use in manufacturing reporting mode",
            "$ref": "#/definitions/severity"
        },

        "eventScope":
        {
            "description": "The event scope PEL field. Optional and defaults to entire_platform",
            "type": "string",
            "enum": ["entire_platform", "single_partition", "multiple_partitions",
                     "possibly_multiple_platforms"]
        },

        "eventType":
        {
            "description": "The event type PEL field. Optional and defaults to na",
            "type": "string",
            "enum": ["na", "misc_information_only", "tracing_event",
                     "dump_notification"]
        },

        "powerFault":
        {
            "description": "The Power Fault SRC field (bit 6 in byte 1 of header). Optional and defaults to false",
            "type": "boolean"
        },

        "actionFlags":
        {
            "description": "The action flags Private Header PEL field",
            "type": "array",
            "items":
            {
                "description": "List of action flags",
                "type": "string",
                "enum": ["service_action", "hidden", "report", "dont_report",
                         "call_home", "isolation_incomplete", "termination"]
            }
        },

        "mfgActionFlags":
        {
            "description": "The PEL action flags to use in manufacturing reporting mode",
            "$ref": "#/definitions/actionFlags"
        },

        "docDescription":
        {
            "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.",
            "type": "string"
        },

        "docMessage":
        {
            "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.",
            "type": "string",
            "examples": [
                {"Message": "The code update from level %1 to %2 failed" }
            ]
        },

        "docMessageArgSources":
        {
            "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.",
            "type": "array",
            "items":
            {
                "type": "string",
                "enum": ["SRCWord6", "SRCWord7", "SRCWord8", "SRCWord9"]
            },
            "additionalItems": false
        },

        "symptomID":
        {
            "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).",
            "type": "array",
            "items":
            {
                "type": "string",
                "enum": ["SRCWord3", "SRCWord4", "SRCWord5", "SRCWord6",
                         "SRCWord7", "SRCWord8", "SRCWord9"]
            },
            "minItems": 1,
            "maxItems": 8,
            "uniqueItems": true,

            "examples": [
                ["SRCWord3", "SRCWord6"]
            ]
        },

        "srcWords6To9":
        {
            "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.",
            "type": "object",
            "patternProperties":
            {
                "^[6-9]$":
                {
                    "type": "object",
                    "properties":
                    {
                        "Description":
                        {
                            "description": "What the value in the field represents.",
                            "type": "string"
                        },
                        "AdditionalDataPropSource":
                        {
                            "description": "Which AdditionalData property key to get the data from.",
                            "type": "string"
                        }
                    },

                    "additionalProperties": false
                },

                "examples":
                {
                    "SRCWords6To9":
                    {
                        "6":
                        {
                            "Description": "Failing PSU number",
                            "AdditionalDataPropSource": "PSU_NUM"
                        }
                    }
                }
            },
            "additionalProperties": false
        }

    }
}
OpenPOWER on IntegriCloud