summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/common/plat/p9/p9_proc_common_actions.rule
blob: 2aea9f915b55015eb7979ce53846b4573924e533 (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
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/usr/diag/prdf/common/plat/p9/p9_proc_common_actions.rule $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2017,2018
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG

########################################################################
#
#  TOD Rules and Groups
#
########################################################################

rule TodErrors
{
    TOD_ERRORREGISTER & (~TOD_ERRORMASK) & (~TOD_ERRORACTION);
};


group gTodErrors filter singlebit
{
    /** TOD_ERRORREGISTER[0]
     *  M_PATH_CONTROL_REG_DATA_PARITY_ERROR
     */
    (TodErrors,bit(0)) ? defaultMaskedError;

    /** TOD_ERRORREGISTER[1]
     *  M_PATH_0_PARITY_ERROR
     */
    (TodErrors,bit(1)) ? selfCapThr32TopReConfig;

    /** TOD_ERRORREGISTER[2]
     *  M_PATH_1_PARITY_ERROR
     */
    (TodErrors,bit(2)) ? selfCapThr32TopReConfig;

    /** TOD_ERRORREGISTER[3]
     *  PCRP0_DATA_PARITY_ERROR
     */
    (TodErrors,bit(3)) ? defaultMaskedError;

    /** TOD_ERRORREGISTER[4]
     *  PCRP1_DATA_PARITY_ERROR
     */
    (TodErrors,bit(4)) ? defaultMaskedError;

    /** TOD_ERRORREGISTER[5]
     *  SCRP0_DATA_PARITY_ERROR
     */
    (TodErrors,bit(5)) ? defaultMaskedError;

    /** TOD_ERRORREGISTER[6]
     *  SCRP1_DATA_PARITY_ERROR
     */
    (TodErrors,bit(6)) ? defaultMaskedError;

    /** TOD_ERRORREGISTER[7]
     *  SPCR_DATA_PARITY_ERROR
     */
    (TodErrors,bit(7)) ? defaultMaskedError;

    /** TOD_ERRORREGISTER[8]
     *  IPCR_DATA_PARITY_ERROR
     */
    (TodErrors,bit(8)) ? defaultMaskedError;

    /** TOD_ERRORREGISTER[9]
     *  PSMSCR_DATA_PARITY_ERROR
     */
    (TodErrors,bit(9)) ? defaultMaskedError;

    /** TOD_ERRORREGISTER[10]
     *  S_PATH_0_PARITY_ERROr
     */
    (TodErrors,bit(10)) ? selfCapThr32TopReConfig;

    /** TOD_ERRORREGISTER[11]
     *  REG_0X08_DATA_PARITY_ERROR
     */
    (TodErrors,bit(11)) ? selfCaptThr32;


    /** TOD_ERRORREGISTER[12]
     *  M_PATH_STATUS_REG_DATA_PARITY_ERROR
     */
    (TodErrors,bit(12)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[13]
     *  S_PATH_STATUS_REG_DATA_PARITY_ERROR
     */
    (TodErrors,bit(13)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[14]
     *  M_PATH_0_STEP_CHECK_ERROR
     */
    (TodErrors,bit(14)) ? analyzeStepCheckErr;

    /** TOD_ERRORREGISTER[15]
     *  M_PATH_1_STEP_CHECK_ERROR
     */
    (TodErrors,bit(15)) ? analyzeStepCheckErr;

    /** TOD_ERRORREGISTER[16]
     *  S_PATH_0_STEP_CHECK_ERROR
     */
    (TodErrors,bit(16)) ? analyzeStepCheckErr;

    /** TOD_ERRORREGISTER[17]
     *  I_PATH_STEP_CHECK_ERROR
     */
    (TodErrors,bit(17)) ? analyzeStepCheckErr;

    /** TOD_ERRORREGISTER[18]
     *  PSS HAMMING DISTANCE
     */
    (TodErrors,bit(18)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[19]
     *  MISC_RESET_REG_DATA_PARITY_ERROR
     */
    (TodErrors,bit(19)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[20]
     *  S_PATH_0_PARITY_ERROR
     */
    (TodErrors,bit(20)) ? selfCapThr32TopReConfig;

    /** TOD_ERRORREGISTER[21]
     *  S_PATH_1_STEP_CHECK_ERROR
     */
    (TodErrors,bit(21)) ? analyzeStepCheckErr;

    /** TOD_ERRORREGISTER[22]
     *  I_PATH_DELAY_STEP_CHECK_PARITY_ERROR
     */
    (TodErrors,bit(22)) ? selfCapThr32TopReConfig;

    /** TOD_ERRORREGISTER[23]
     *  REG_0X0C DATA_PARITY ERROR
     */
    (TodErrors,bit(23)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[24]
     *  REG_0X11_0X12_0X13_0X14_0X15_0X16_DATA_PARITY_ERROR
     */
    (TodErrors,bit(24)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[25]
     * REG_0X17_0X18_0X21_0X22_DATA_PARITY_ERROR
     */
    (TodErrors,bit(25)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[26]
     *  REG_0X1D_0X1E_0X1F_DATA_PARITY_ERROR
     */
    (TodErrors,bit(26)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[27]
     *  TIMER_VALUE_REG_DATA_PARITY_ERROR
     */
    (TodErrors,bit(27)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[28]
     *  LOW_ORDER_STEP_REG_DATA_PARITY_ERROR
     */
    (TodErrors,bit(28)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[29]
     *  FSM_REG_DATA_PARITY_ERROR
     */
    (TodErrors,bit(29)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[30]
     *  RX_TTYPE_CONTROL_REG_DATA_PARITY_ERROR
     */
    (TodErrors,bit(30)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[31]
     *  REG_0X30_0X31_0X32_0X33_DATA_PARITY_ERROR
     */
    (TodErrors,bit(31)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[32]
     *  CHIP_CONTROL_REG_DATA_PARITY_ERROR
     */
    (TodErrors,bit(32)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[33]
     *  I_PATH_SYNC_CHECK_ERROR
     */
    (TodErrors,bit(33)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[34]
     *  I_PATH_FSM_STATE_PARITY_ERROR
     */
    (TodErrors,bit(34)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[35]
     *  I_PATH_TIME_REG_PARITY_ERROR
     */
    (TodErrors,bit(35)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[36]
     *  I_PATH_TIME_REG_OVERFLOW
     */
    (TodErrors,bit(36)) ? maskTodError;

    /** TOD_ERRORREGISTER[37]
     *  WOF_LOW_ORDER_STEP_COUNTER_PARITY_ERROR
     */
    (TodErrors,bit(37)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[38|39|40|41|42|43]
     *  RX_TTYPE_1
     */
    (TodErrors,bit(38|39|40|41|42|43)) ? defaultMaskedError;

    #Note: For firmware all the TOD-PIB errors are informational by nature.So,
    # not doing any special analysis.
    /** TOD_ERRORREGISTER[44]
     *  PIB_SLAVE_ADDR_INVALID_ERROR
     */
    (TodErrors,bit(44)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[45]
     *  PIB_SLAVE_WRITE_INVALID_ERROR
     */
    (TodErrors,bit(45)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[46]
     *  PIB_SLAVE_READ_INVALID_ERROR
     */
    (TodErrors,bit(46)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[47]
     *  PIB_SLAVE_ADDR_PARITY_ERROR
     */
    (TodErrors,bit(47)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[48]
     *  PIB_SLAVE_DATA_PARITY_ERROR
     */
    (TodErrors,bit(48)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[49]
     *  TTYPE_CONTROL_REG_DATA_PARITY_ERROR
     */
    #Note: Based on discussion with with Hardware Team and PHYP, this error
    #shall be routed to PHYP instead of FSP
    (TodErrors,bit(49)) ? defaultMaskedError;

    /** TOD_ERRORREGISTER[50|51|52]
     *  PIB_MASTER_RSP_INFO_ERROR
     */
    #ignoring TOD-PIB errors for any special analysis.Since errors are
    #informational by nature.
    (TodErrors,bit( 50|51|52 )) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[53]
     *  RX_TTYPE_INVALID_ERROR
     */
    (TodErrors,bit(53 )) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[54]
     *  RX_TTYPE_4_DATA_PARITY_ERROR
     */
    (TodErrors,bit(54)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[55]
     *  PIB_MASTER_REQUEST_ERROR
     */
    (TodErrors,bit(55)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[56]
     *  PIB_RESET_DURING_PIB_ACCESS_ERROR
     */
    (TodErrors,bit(56)) ? selfCaptThr32;

    /** TOD_ERRORREGISTER[57]
     *  EXTERNAL_XSTOP_ERROR
     */
    #bit tells us that TOD has received an external check stop
    #purpose is to merely provide an information. Hence not doing any
    #analysis.
    (TodErrors,bit(57)) ? defaultMaskedError;

    #bit[58:63] not implemented
    /** TOD_ERRORREGISTER[58|59|60|61|62|63]
     *  SPARE_ERROR
     */
    (TodErrors,bit(58|59|60|61|62|63)) ? defaultMaskedError;

};


actionclass level2_M_self_L_th_32perDay
{
    callout2ndLvlMed;
    calloutSelfLowNoGard;
    threshold32pday;
};

/** Callout connected NX, threshold 32/day */
actionclass nx_th_32perDay
{
    callout(connected(TYPE_NX,0), MRU_MED);
    threshold32pday;
};

/** Callout connected NX, threshold 1 */
actionclass nx_th_1
{
    callout(connected(TYPE_NX,0), MRU_MED);
    threshold1;
};

/** Callout connected NX, threshold 1, SUE originated from somewhere else */
actionclass nx_th_1_SUE { nx_th_1; SueSeen; };

actionclass analyzePciChipletFir0
{
    capture(PciChipletFir0);
    analyze(gPCI0_CHIPLET_FIR);
};

actionclass analyzePciChipletFir1
{
    capture(PciChipletFir1);
    analyze(gPCI1_CHIPLET_FIR);
};

actionclass analyzePciChipletFir2
{
    capture(PciChipletFir2);
    analyze(gPCI2_CHIPLET_FIR);
};

/** PLL Threshold of 2 per 5 mins */
actionclass thresholdPll
{
    threshold( field(2 / 5 min) );
};

# This action is for the case where TP_LFIR[21] comes on
# but PLL code does not isolate to any PLL errors.  The
# threshold is the same as PLL one 2 per 5 mins with
# callout/gard the chip at threshold along with PLL scom
# data captured.
/** PCB Slave Internal parity error action */
actionclass pcb_slave_internal_parity
{
    capture(PllFIRs);
    calloutSelfHigh;
    thresholdPll;
    funccall("capturePllFfdc");
    funccall("clearParityError");
};

/**
 * Threshold 32/day (field) and 1 (mnfg). Do not predictively callout on
 * threshold, instead just mask.
 */
actionclass pb_cent_hang_recovery_gte
{
    capture(PbCentMode);
    calloutSelfMed;
    threshold32pday;
    funccall("ClearServiceCallFlag_mnfgInfo");
};

actionclass deadmanTimer
{
    funccall("handleDeadmanTimer");
};

actionclass sbe_vital_attn
{
    threshold_and_mask_self;
    funccall("handleSbeVital");
};

actionclass pmRecovery
{
    funccall("PmRecovery");
    threshold1;
};

/** Special wrapper for NPU0FIR to collect extra FFDC */
actionclass analyzeNPU0FIR
{
    capture(npu0fir_ffdc);
    analyze(gNPU0FIR);
};

/** Special wrapper for NPU1FIR to collect extra FFDC */
actionclass analyzeNPU1FIR
{
    capture(npu1fir_ffdc);
    analyze(gNPU1FIR);
};

/** Special wrapper for NPU2FIR to collect extra FFDC */
actionclass analyzeNPU2FIR
{
    capture(npu2fir_ffdc);
    analyze(gNPU2FIR);
};

/** Special wrapper for INTCQFIR to collect extra FFDC */
actionclass analyzeINTCQFIR
{
    capture(intcqfir_ffdc);
    analyze(gINTCQFIR);
};

/** Callout connected XBUS 0 interface on first occurrence */
actionclass calloutBusInterface_xbus0_th_1
{
    funccall("calloutBusInterface_XBUS0");
    threshold1;
};

/** Callout connected XBUS 1 interface on first occurrence */
actionclass calloutBusInterface_xbus1_th_1
{
    funccall("calloutBusInterface_XBUS1");
    threshold1;
};

/** Callout connected XBUS 2 interface on first occurrence */
actionclass calloutBusInterface_xbus2_th_1
{
    funccall("calloutBusInterface_XBUS2");
    threshold1;
};

/** Callout connected OBUS 0 interface on first occurrence */
actionclass calloutBusInterface_obus0_th_1
{
    funccall("calloutBusInterface_OBUS0");
    threshold1;
};

/** Callout connected OBUS 1 interface on first occurrence */
actionclass calloutBusInterface_obus1_th_1
{
    funccall("calloutBusInterface_OBUS1");
    threshold1;
};

/** Callout connected OBUS 2 interface on first occurrence */
actionclass calloutBusInterface_obus2_th_1
{
    funccall("calloutBusInterface_OBUS2");
    threshold1;
};

/** Callout connected OBUS 3 interface on first occurrence */
actionclass calloutBusInterface_obus3_th_1
{
    funccall("calloutBusInterface_OBUS3");
    threshold1;
};

# TOD Actions:
#   * Capture at least this chip TOD registers.
#
#   * Threshold normal TOD errors (TOD error register) at 32/day.
#
#   * Network Errors : Step Check Fault or "PHYP Failed Topology"
#    - PHYP Failed Topology must be visible and "Request new Topology".
#        - May have PHYP failure on another chip.
#    - Capture TOD registers for whole system.
#    - Isolate both topologies and make callout.

/**
 * Analyze TOD Register.
 */
actionclass TodReportByRegister
{
    try(analyze(gTodErrors),TodRegisterAnalyzeFail);
};

actionclass TodRegisterAnalyzeFail
{
    capture(TODReg);
    self_H_th_1;
};

/**
 * PHYP Network fault.
 */
actionclass TodReportByPHYP
{
    threshold1;
    funccall("todStepCheckFault");
};

/**
 * TOD Step Check Fault - Isolate topology.
 */
actionclass analyzeStepCheckErr
{
    threshold32pday;
    funccall("todStepCheckFault");
};

/** action for tod errors which do not need any specific ananlysis */

actionclass selfCaptThr32
{
    calloutSelfHigh;
    capture(TODReg);
    threshold32pday;
};

/**
 *  Mask indication from PHYP due to all cores evacuated.
 *    - Mask TOD errors from this chip.
 *    - Not visible unless xstp.
 *    - Request new topology if chip is MDMT.
 */
actionclass maskTodError
{
    self_H_th_1;
    capture(TODReg);
    funccall("ClearServiceCallFlag");
    funccall("todNewTopologyIfBackupMDMT");
};

/** callout Proc reporting error. If threshold reaches 32 per day, request
 *  reconfiguration of topology.
 */
actionclass selfCapThr32TopReConfig
{
    selfCaptThr32;
    funccall("requestTopologySwitch");
};

/** analyzes backup topology if TOD error analysis is enabled */
actionclass analyzeTodBackupTopology
{
    try( funccall("isTodDisabled"), TodReportByRegister );
};

/** callout and gard self if TOD error analysis is enabled */
actionclass analyzePibError
{
    capture(TODReg);
    try( funccall("isTodDisabled"), self_H_th_1 );
};

/** analyzes active topology if TOD error analysis is enabled */
actionclass analyzePhypTodError
{
    try( funccall("isTodDisabled"), TodReportByPHYP );
};

/** action to analyze INT_CQ_FIR_PC_RECOV_ERROR_0_2 */
actionclass analyzeIntCqFirPcRecovError
{
    try( funccall("handleIntCqFirPcRecovError"), level2_M_self_L_th_1 );
};
OpenPOWER on IntegriCloud