summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/common/plat/pegasus/Ex.rule
blob: 9edd2a6caf019ded5d6064ce9fd8cd3a3a5c2efe (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
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/usr/diag/prdf/common/plat/pegasus/Ex.rule $
#
# IBM CONFIDENTIAL
#
# COPYRIGHT International Business Machines Corp. 2012,2013
#
# p1
#
# Object Code Only (OCO) source materials
# Licensed Internal Code Source Materials
# IBM HostBoot Licensed Internal Code
#
# The source code for this program is not published or otherwise
# divested of its trade secrets, irrespective of what has been
# deposited with the U.S. Copyright Office.
#
# Origin: 30
#
# IBM_PROLOG_END_TAG

################################################################################
#
# Scope:
#   Registers and actions for the following chiplets:
#       Note that only addresses for EX0 will be used.
#
# Chiplet  Register Addresses       Description
# =======  =======================  ============================================
#   EX0    0x10000000 - 0x10FFFFFF  EX0 pervasive logic
#   EX1    0x11000000 - 0x11FFFFFF  EX1 pervasive logic
#   EX2    0x12000000 - 0x12FFFFFF  EX2 pervasive logic
#   EX3    0x13000000 - 0x13FFFFFF  EX3 pervasive logic
#   EX4    0x14000000 - 0x14FFFFFF  EX4 pervasive logic
#   EX5    0x15000000 - 0x15FFFFFF  EX5 pervasive logic
#   EX6    0x16000000 - 0x16FFFFFF  EX6 pervasive logic
#   EX7    0x17000000 - 0x17FFFFFF  EX7 pervasive logic
#   EX8    0x18000000 - 0x18FFFFFF  EX8 pervasive logic
#   EX9    0x19000000 - 0x19FFFFFF  EX9 pervasive logic
#   EX10   0x1A000000 - 0x1AFFFFFF  EX10 pervasive logic
#   EX11   0x1B000000 - 0x1BFFFFFF  EX11 pervasive logic
#   EX12   0x1C000000 - 0x1CFFFFFF  EX12 pervasive logic
#   EX13   0x1D000000 - 0x1DFFFFFF  EX13 pervasive logic
#   EX14   0x1E000000 - 0x1EFFFFFF  EX14 pervasive logic
#   EX15   0x1F000000 - 0x1FFFFFFF  EX15 pervasive logic
#
################################################################################

chip Ex
{
    name        "Power8 EX Chiplet";
    targettype  TYPE_EX;
    sigoff      0x8000;
# FIXME May need to update dump type
    dump        DUMP_CONTENT_HW;
    scomlen     64;

 #############################################################################
 #                                                                           #
 #  ######                                                                   #
 #  #     #  ######   ####     ###    ####    #####  ######  #####    ####   #
 #  #     #  #       #    #     #    #          #    #       #    #  #       #
 #  ######   #####   #          #     ####      #    #####   #    #   ####   #
 #  #   #    #       #  ###     #         #     #    #       #####        #  #
 #  #    #   #       #    #     #    #    #     #    #       #   #   #    #  #
 #  #     #  ######   ####     ###    ####      #    ######  #    #   ####   #
 #                                                                           #
 #############################################################################

    ############################################################################
    # EX Chiplet Registers
    ############################################################################

    register EX_CHIPLET_CS_FIR
    {
        name        "EX00.TP.ECO_DOM.XFIR";
        scomaddr    0x10040000;
        capture     group default;
    };

    register EX_CHIPLET_RE_FIR
    {
        name        "EX00.TP.ECO_DOM.RFIR";
        scomaddr    0x10040001;
        capture     group default;
    };

    register EX_CHIPLET_FIR_MASK
    {
        name        "EX00.TP.ECO_DOM.FIR_MASK";
        scomaddr    0x10040002;
        capture     group default;
    };

    # EX special attention registers - Used for FFDC only
    # Currently, all analysis of these registers is done by ATTN.

    register EX_CHIPLET_SPA
    {
        name        "EX00.TP.ECO_DOM.EPS.FIR.SPATTN";
        scomaddr    0x10040004;
        capture     group default;
    };

    ############################################################################
    # EX Chiplet LFIR
    ############################################################################

    register EX_LFIR
    {
        name        "EX00.TP.ECO_DOM.LOCAL_FIR";
        scomaddr    0x1004000a;
        reset       (&, 0x1004000b);
        mask        (|, 0x1004000f);
        capture     group default;
    };

    register EX_LFIR_MASK
    {
        name        "EX00.TP.ECO_DOM.EPS.FIR.LOCAL_FIR_MASK";
        scomaddr    0x1004000d;
        capture     group default;
    };

    register EX_LFIR_ACT0
    {
        name        "EX00.TP.ECO_DOM.EPS.FIR.LOCAL_FIR_ACTION0";
        scomaddr    0x10040010;
        capture     type secondary;
        capture     group default;
        capture     req nonzero("EX_LFIR");
    };

    register EX_LFIR_ACT1
    {
        name        "EX00.TP.ECO_DOM.EPS.FIR.LOCAL_FIR_ACTION1";
        scomaddr    0x10040011;
        capture     type secondary;
        capture     group default;
        capture     req nonzero("EX_LFIR");
    };

    ############################################################################
    # EX Chiplet COREFIR
    ############################################################################

    register COREFIR
    {
        name        "EX00.EC.PC.PC_NE.FIR.CORE_FIR";
        scomaddr    0x10013100;
        reset       (&, 0x10013101);
        mask        (|, 0x10013105);
        capture     group default;
    };

    register COREFIR_MASK
    {
        name        "EX00.EC.PC.PC_NE.FIR.CORE_FIRMASK";
        scomaddr    0x10013103;
        capture     group default;
    };

    register COREFIR_ACT0
    {
        name        "EX00.EC.PC.PC_NE.FIR.CORE_ACTION0";
        scomaddr    0x10013106;
        capture     type secondary;
        capture     group default;
        capture     req nonzero("COREFIR");
    };

    register COREFIR_ACT1
    {
        name        "EX00.EC.PC.PC_NE.FIR.CORE_ACTION1";
        scomaddr    0x10013107;
        capture     type secondary;
        capture     group default;
        capture     req nonzero("COREFIR");
    };

    ############################################################################
    # EX Chiplet L2FIR
    ############################################################################

    register L2FIR
    {
        name        "EX00.L2.L2MISC.L2CERRS.FIR_REG";
        scomaddr    0x10012800;
        reset       (&, 0x10012801);
        mask        (|, 0x10012805);
        capture     group default;
    };

    register L2FIR_MASK
    {
        name        "EX00.L2.L2MISC.L2CERRS.FIR_MASK_REG";
        scomaddr    0x10012803;
        capture     group default;
    };

    register L2FIR_ACT0
    {
        name        "EX00.L2.L2MISC.L2CERRS.FIR_ACTION0_REG";
        scomaddr    0x10012806;
        capture     type secondary;
        capture     group default;
        capture     req nonzero("L2FIR");
    };

    register L2FIR_ACT1
    {
        name        "EX00.L2.L2MISC.L2CERRS.FIR_ACTION1_REG";
        scomaddr    0x10012807;
        capture     type secondary;
        capture     group default;
        capture     req nonzero("L2FIR");
    };

    ############################################################################
    # EX Chiplet L3FIR
    ############################################################################

    register L3FIR
    {
        name        "EX00.L3.L3_MISC.L3CERRS.FIR_REG";
        scomaddr    0x10010800;
        reset       (&, 0x10010801);
        mask        (|, 0x10010805);
        capture     group default;
    };

    register L3FIR_MASK
    {
        name        "EX00.L3.L3_MISC.L3CERRS.FIR_MASK_REG";
        scomaddr    0x10010803;
        capture     group default;
    };

    register L3FIR_ACT0
    {
        name        "EX00.L3.L3_MISC.L3CERRS.FIR_ACTION0_REG";
        scomaddr    0x10010806;
        capture     type secondary;
        capture     group default;
        capture     req nonzero("L3FIR");
    };

    register L3FIR_ACT1
    {
        name        "EX00.L3.L3_MISC.L3CERRS.FIR_ACTION1_REG";
        scomaddr    0x10010807;
        capture     type secondary;
        capture     group default;
        capture     req nonzero("L3FIR");
    };

    ############################################################################
    # EX Chiplet NCUFIR
    ############################################################################

    register NCUFIR
    {
        name        "EX00.NC.NCMISC.NCSCOMS.FIR_REG";
        scomaddr    0x10010c00;
        reset       (&, 0x10010c01);
        mask        (|, 0x10010c05);
        capture     group default;
    };

    register NCUFIR_MASK
    {
        name        "EX00.NC.NCMISC.NCSCOMS.FIR_MASK_REG";
        scomaddr    0x10010c03;
        capture     group default;
    };

    register NCUFIR_ACT0
    {
        name        "EX00.NC.NCMISC.NCSCOMS.FIR_ACTION0_REG";
        scomaddr    0x10010c06;
        capture     type secondary;
        capture     group default;
        capture     req nonzero("NCUFIR");
    };

    register NCUFIR_ACT1
    {
        name        "EX00.NC.NCMISC.NCSCOMS.FIR_ACTION1_REG";
        scomaddr    0x10010c07;
        capture     type secondary;
        capture     group default;
        capture     req nonzero("NCUFIR");
    };

    ############################################################################
    # EX Chiplet SPATTNs
    ############################################################################

    # EX special attention registers - Used for FFDC only
    # Currently, all analysis of these registers is done by ATTN.

    register SPATTN_0
    {
        name        "EX00.EC.PC.PC_NE.TCTL0.SPATTN";
        scomaddr    0x10013007;
        capture     group default;
    };

    register SPATTN_1
    {
        name        "EX00.EC.PC.PC_NE.TCTL1.SPATTN";
        scomaddr    0x10013017;
        capture     group default;
    };

    register SPATTN_2
    {
        name        "EX00.EC.PC.PC_NE.TCTL2.SPATTN";
        scomaddr    0x10013027;
        capture     group default;
    };
    register SPATTN_3
    {
        name        "EX00.EC.PC.PC_NE.TCTL3.SPATTN";
        scomaddr    0x10013037;
        capture     group default;
    };

    register SPATTN_4
    {
        name        "EX00.EC.PC.PC_NE.TCTL4.SPATTN";
        scomaddr    0x10013047;
        capture     group default;
    };

    register SPATTN_5
    {
        name        "EX00.EC.PC.PC_NE.TCTL5.SPATTN";
        scomaddr    0x10013057;
        capture     group default;
    };

    register SPATTN_6
    {
        name        "EX00.EC.PC.PC_NE.TCTL6.SPATTN";
        scomaddr    0x10013067;
        capture     group default;
    };

    register SPATTN_7
    {
        name        "EX00.EC.PC.PC_NE.TCTL7.SPATTN";
        scomaddr    0x10013077;
        capture     group default;
    };

    ############################################################################
    # EX Chiplet Other Registers
    ############################################################################

    register COREHMEER
    {
        name        "Core HMEER";
        scomaddr    0x1001329B;
        capture     type secondary;
        capture     group default;
    };
};

 ##############################################################################
 #                                                                            #
 # ####                                 #                                     #
 # #   # #   # #    #####  ###      #  # #    ##  ##### ###  ###  #   #  ###  #
 # #   # #   # #    #     #        #  #   #  #  #   #    #  #   # ##  # #     #
 # ####  #   # #    ####   ###    #  ####### #      #    #  #   # # # #  ###  #
 # #  #  #   # #    #         #  #   #     # #  #   #    #  #   # #  ##     # #
 # #   #  ###  #### #####  ###  #    #     #  ##    #   ###  ###  #   #  ###  #
 #                                                                            #
 ##############################################################################

################################################################################
# EX Chiplet Registers
################################################################################

rule ExChipletFir
{
  CHECK_STOP:
     (EX_CHIPLET_CS_FIR       & `1F00000000000000`) & ~EX_CHIPLET_FIR_MASK;
  RECOVERABLE:
    ((EX_CHIPLET_RE_FIR >> 2) & `3F00000000000000`) & ~EX_CHIPLET_FIR_MASK;
};

group gExChipletFir attntype CHECK_STOP, RECOVERABLE filter priority(3,5,6,7,4,2)
{
    /** EX_CHIPLET_FIR[2]
     *  Unit Checkstop from Core Local FIR (bit0 in RER)
     */
    (ExChipletFir, bit(2))? analyzeCoreUnitCheckstop;

    /** EX_CHIPLET_FIR[3]
     *  Attention from LFIR
     */
    (ExChipletFir, bit(3))? analyzeExLFir;

    /** EX_CHIPLET_FIR[4]
     *  Attention from COREFIR
     */
    (ExChipletFir, bit(4)) ? analyzeCore;

    /** EX_CHIPLET_FIR[5]
     *  Attention from L2FIR
     */
    (ExChipletFir, bit(5)) ? analyzeL2Fir;

    /** EX_CHIPLET_FIR[6]
     *  Attention from L3FIR
     */
    (ExChipletFir, bit(6)) ? analyzeL3Fir;

    /** EX_CHIPLET_FIR[7]
     *  Attention from NCUFIR
     */
    (ExChipletFir, bit(7)) ? analyzeNcuFir;
};

################################################################################
# EX Chiplet LFIR
################################################################################

rule ExLFir
{
    CHECK_STOP:  EX_LFIR & ~EX_LFIR_MASK & ~EX_LFIR_ACT0 & ~EX_LFIR_ACT1;
    RECOVERABLE: EX_LFIR & ~EX_LFIR_MASK & ~EX_LFIR_ACT0 &  EX_LFIR_ACT1;
};

group gExLFir filter singlebit
{
    /** EX_LFIR[0]
     *  CFIR internal parity error
     */
    (ExLFir, bit(0)) ? calloutParentChipHighThr32;

    /** EX_LFIR[1]
     *  Local errors from GPIO (PCB error)
     */
    (ExLFir, bit(1)) ? defaultMaskedError;

    /** EX_LFIR[2]
     *  Local errors from CC (PCB error)
     */
    (ExLFir, bit(2)) ? defaultMaskedError;

    /** EX_LFIR[3]
     *  Local errors from CC (OPCG, parity, scan collision, ...)
     */
    (ExLFir, bit(3)) ? defaultMaskedError;

    /** EX_LFIR[4]
     *  Local errors from PSC (PCB error)
     */
    (ExLFir, bit(4)) ? defaultMaskedError;

    /** EX_LFIR[5]
     *  Local errors from PSC (parity error)
     */
    (ExLFir, bit(5)) ? defaultMaskedError;

    /** EX_LFIR[6]
     *  Local errors from Thermal (parity error)
     */
    (ExLFir, bit(6)) ? defaultMaskedError;

    /** EX_LFIR[7]
     *  Local errors from Thermal (PCB error)
     */
    (ExLFir, bit(7)) ? defaultMaskedError;

    /** EX_LFIR[8|9]
     *  Local errors from Thermal (Trip error)
     */
    (ExLFir, bit(8|9)) ? defaultMaskedError;

    /** EX_LFIR[10]
     *  Local errors from trace array - error
     */
    (ExLFir, bit(10)) ? calloutParentChipHighThr32;

    /** EX_LFIR[11]
     *  Local errors from Trace Array ( error)
     */
    (ExLFir, bit(11)) ? defaultMaskedError;

    /** EX_LFIR[12|13]
     *  Local errors from trial
     */
    (ExLFir, bit(12|13)) ? defaultMaskedError;

    /** EX_LFIR[14]
     *  Local errors from OHA - recov error
     */
    (ExLFir, bit(14)) ? defaultMaskedError;

    /** EX_LFIR[15]
     *  Local errors from OHA - checkstop
     */
    (ExLFir, bit(15)) ? defaultMaskedError;

    /** EX_LFIR[16]
     *  Local errors from skewadj
     */
    (ExLFir, bit(16)) ? calloutParentChipHighThr32;

    /** EX_LFIR[17]
     *  local errors from dcadj
     */
    (ExLFir, bit(17)) ? calloutParentChipHighThr32;

    /** EX_LFIR[18:30]
     *  Unused local errors
     */
    (ExLFir, bit(18|19|20|21|22|23|24|25|26|27|28|29|30)) ? defaultMaskedError;
};

################################################################################
# EX Chiplet COREFIR
################################################################################

rule CoreFir
{
    CHECK_STOP:  COREFIR & ~COREFIR_MASK &  COREFIR_ACT0 & ~COREFIR_ACT1;
    PROC_CS:     COREFIR & ~COREFIR_MASK &  COREFIR_ACT0 &  COREFIR_ACT1;
    RECOVERABLE: COREFIR & ~COREFIR_MASK & ~COREFIR_ACT0 &  COREFIR_ACT1;
};

#Based on RAS SpreadSheet p8dd1_mss_FFDC_51.xls
group gCoreFir filter singlebit
{
    /** COREFIR[0]
     *  IFU_SRAM_PARITY_ERR: SRAM recoverable error (ICACHE parity error, etc.)
     */
    (CoreFir, bit(0)) ? SelfHighThr5PerHour;

    /** COREFIR[1]
     *  IF_SETDELETE_ERR: set deleted
     */
    (CoreFir, bit(1)) ? SelfHighThr1;

    /** COREFIR[2]
     *  IF_RFILE_REC_ERR: RegFile recoverable error
     */
    (CoreFir, bit(2)) ? SelfHighThr5PerHour;

    /** COREFIR[3]
     *  IF_RFILE_CHKSTOP_ERR: RegFile core check stop
     */
    (CoreFir, bit(3)) ? SelfHighThr1;

    /** COREFIR[4]
     *  IF_LOG_REC_ERR: logic recoverable error
     */
    (CoreFir, bit(4)) ? SelfHighThr5PerHour;

    /** COREFIR[5]
     *  IF_LOG_CHKSTOP_ERR: logic core check stop
     */
    (CoreFir, bit(5)) ? SelfHighThr1;

    /** COREFIR[6]
     *  IF_NOT_MT_REC_ERR: recoverable if not in MT window
     */
    (CoreFir, bit(6)) ? SelfMedThr32PerDay;

    /** COREFIR[7]
     *  IF_CHKSTOP_ERR: system check stop
     */
    (CoreFir, bit(7)) ? SelfHighThr1;

    /** COREFIR[8]
     *  RECOV_FIR_CHKSTOP_ERR: recovery core check stop
     */
    (CoreFir, bit(8)) ? spareOrSelfHighThr1;

    /** COREFIR[9]
     *  SD_RFILE_REC_ERR: RegFile recoverable error
     */
    (CoreFir, bit(9)) ? SelfHighThr5PerHour;

    /** COREFIR[10]
     *  SD_RFILE_CHKSTOP_ERR: RegFile core check stop (mapper error)
     */
    (CoreFir, bit(10)) ? SelfHighThr1;

    /** COREFIR[11]
     *  SD_LOG_REC_ERR: logic recoverable error
     */
    (CoreFir, bit(11)) ? SelfHighThr5PerHour;

    /** COREFIR[12]
     *  SD_LOG_CHKSTOP_ERR: logic core check stop
     */
    (CoreFir, bit(12)) ? SelfHighThr1;

    /** COREFIR[13]
     *  SD_NOT_MT_REC_ERR: recoverable if not in MT window
     */
    (CoreFir, bit(13)) ? SelfMedThr32PerDay;

    /** COREFIR[14]
     *  SD_MCHK_AND_ME_EQ_0: MCHK received while ME=0 non recoverable
     */
    # FIXME: RTC 85697: Make sure this is SUE-CS bit
    (CoreFir, bit(14)) ? calloutSelfHighSUE;

    /** COREFIR[15]
     *  SD_PC_L2_UE_ERR: UE from L2
     */
    (CoreFir, bit(15)) ? defaultMaskedError;

    /** COREFIR[16]
     *  ISU_L2_UE_OVER_TH_ERR: Number of UEs from L2 above threshold
     */
    (CoreFir, bit(16)) ? defaultMaskedError;

    /** COREFIR[17]
     *  SD_PC_CI_UE: UE on CI load
     */
    (CoreFir, bit(17)) ? defaultMaskedError;

    /** COREFIR[18]
     *  UNUSED_2
     */
    (CoreFir, bit(18)) ? defaultMaskedError;

    /** COREFIR[19]
     *  FX_GPR_REC_ERR: GPR recoverable error
     */
    (CoreFir, bit(19)) ? SelfHighThr5PerHour;

    /** COREFIR[20]
     *  UNUSED_3
     */
    (CoreFir, bit(20)) ? defaultMaskedError;

    /** COREFIR[21]
     *  FX_LOG_CHKSTOP_ERR: logic core check stop
     */
    (CoreFir, bit(21)) ? SelfHighThr1;

    /** COREFIR[22]
     *  FX_NOT_MT_REC_ERR: recoverable if not in MT window
     */
    (CoreFir, bit(22)) ? SelfMedThr32PerDay;

    /** COREFIR[23]
     *  VS_VRF_REC_ERR: VRF recoverable error
     */
    (CoreFir, bit(23)) ? SelfHighThr5PerHour;

    /** COREFIR[24]
     *  VS_LOG_REC_ERR: logic recoverable error
     */
    (CoreFir, bit(24)) ? SelfHighThr5PerHour;

    /** COREFIR[25]
     *  VS_LOG_CHKSTOP_ERR: logic core check stop
     */
    (CoreFir, bit(25)) ? SelfHighThr1;

    /** COREFIR[26]
     *  RECOV_IN_MAINT_ERR: 26 = recov_in_maint
     */
    (CoreFir, bit(26)) ? callout2ndLvlMed;

    /** COREFIR[27]
     *  DU_LOG_REC_ERR: logic recoverable error
     */
    (CoreFir, bit(27)) ? SelfHighThr5PerHour;

    /** COREFIR[28]
     *  DU_LOG_CHKSTOP_ERR: logic core check stop
     */
    (CoreFir, bit(28)) ? defaultMaskedError;

    /** COREFIR[29]
     *  LSU_SRAM_PARITY_ERR: SRAM recoverable error (DCACHE parity error, etc.)
     */
    (CoreFir, bit(29)) ? SelfHighThr5PerHour;

    /** COREFIR[30]
     *  LS_SETDELETE_ERR: set deleted
     */
    (CoreFir, bit(30)) ? SelfHighThr1;

    /** COREFIR[31]
     *  LS_RFILE_REC_ERR: RegFile recoverable error
     */
    (CoreFir, bit(31)) ? SelfHighThr5PerHour;

    /** COREFIR[32]
     *  LS_RFILE_CHKSTOP_ERR: RegFile core check stop
     */
    (CoreFir, bit(32)) ? SelfHighThr1;

    /** COREFIR[33]
     *  LS_TLB_MULTIHIT_ERR: special recovery error TLB multi hit error occurred
     */
    (CoreFir, bit(33)) ? defaultMaskedError;

    /** COREFIR[34]
     *  LS_SLB_MULTIHIT_ERR: special recovery error SLBFEE multi hit error occurred
     */
    (CoreFir, bit(34)) ? defaultMaskedError;

    /** COREFIR[35]
     *  LS_DERAT_MULTIHIT_ERR: special recovery error ERAT multi hit error occurred
     */
    (CoreFir, bit(35)) ? defaultMaskedError;

    /** COREFIR[36]
     *  FORWARD_PROGRESS_ERR: forward progress error
     */
    (CoreFir, bit(36)) ? SelfHighThr1;

    /** COREFIR[37]
     *  LS_LOG_REC_ERR: logic recoverable error
     */
    (CoreFir, bit(37)) ? SelfHighThr5PerHour;

    /** COREFIR[38]
     *  LS_LOG_CHKSTOP_ERR: logic core check stop
     */
    (CoreFir, bit(38)) ? SelfHighThr1;

    /** COREFIR[39]
     *  LS_NOT_MT_REC_ERR: recoverable if not in MT window
     */
    (CoreFir, bit(39)) ? SelfMedThr32PerDay;

    /** COREFIR[40]
     *  LS_NOT_CI_REC_ERR: recoverable if not in CI window
     */
    (CoreFir, bit(40)) ? SelfMedThr32PerDay;

    /** COREFIR[41]
     *  LS_CHKSTOP_ERR: system check stop
     */
    (CoreFir, bit(41)) ? SelfHighThr1;

    /** COREFIR[42]
     *  LS_GPR_RCV_CHKSTOP_ERR: UE from GPR/VRF recovery process
     */
    (CoreFir, bit(42)) ? defaultMaskedError;

    /** COREFIR[43]
     *  THREAD_HANG_REC_ERR: thread hang recoverable error
     */
    (CoreFir, bit(43)) ? SelfAndLevel2MedThr5PerHr;

    /** COREFIR[44]
     *  FIR_LOG_RECOV_ERR: logic recoverable error
     */
    (CoreFir, bit(44)) ? SelfHighThr5PerHour;

    /** COREFIR[45]
     *  PC_LOG_CHKSTOP_ERR: PC logic core check stop
     */
    (CoreFir, bit(45)) ? SelfHighThr1;

    /** COREFIR[46]
     *  RESERVED
     */
    (CoreFir, bit(46)) ? defaultMaskedError;

    /** COREFIR[47]
     *  TFC_FIR_TFMR_P_ERR: TFMR Parity Error (timing facility may be corrupt)
     */
    (CoreFir, bit(47)) ? defaultMaskedError;

    /** COREFIR[48]
     *  SPRD_FIR_HYP_RES_P_ERR: Hypervisor Resource error - core check stop
     */
    (CoreFir, bit(48)) ? SelfHighThr1;

    /** COREFIR[49]
     *  TFC_FIR_P_ERR: TFAC parity error
     */
    (CoreFir, bit(49)) ? defaultMaskedError;

    /** COREFIR[50]
     *  TFC_FIR_CONTROL_ERR: TFAC control error
     */
    (CoreFir, bit(50)) ? defaultMaskedError;

    /** COREFIR[51]
     *  PC_FIRM_AND_SEL_ERR: TFAC firmware error and select error
     */
    (CoreFir, bit(51)) ? defaultMaskedError;

    /** COREFIR[52]
     *  CORE_HUNG: Hang recovery failed (core check stop)
     */
    (CoreFir, bit(52)) ? SelfHighThr1;

    /** COREFIR[53]
     *  CORE_HANG_DETECT: Internal hang detected (core hang)
     */
    (CoreFir, bit(53)) ? defaultMaskedError;

    /** COREFIR[54]
     *  AMBI_HANG_DETECT: Hang detected unknown source
     */
    (CoreFir, bit(54)) ? calloutSelfAndLevel2MedThr1;

    /** COREFIR[55]
     *  NEST_HANG_DETECT: External Hang detected
     */
    # FIXME: RTC 85697: Make sure this is SUE-CS bit
    (CoreFir, bit(55)) ? calloutProcLow2ndLvlMedThr1SUE;

    /** COREFIR[56|57|58]
     *  RESERVED
     */
    (CoreFir, bit(56|57|58)) ? defaultMaskedError;

    /** COREFIR[59]
     *  PC_SOM_ERR: SCOM satellite error detected
     */
    (CoreFir, bit(59)) ? defaultMaskedError;

    /** COREFIR[60]
     *  DBG_FIR_CHECKSTOP_ON_TRIGGER: debug Trigger Error inject
     */
    (CoreFir, bit(60)) ? defaultMaskedError;

    /** COREFIR[61]
     *  SP_INJ_REC_ERR: SCOM or Firmware recoverable Error Inject
     */
    (CoreFir, bit(61)) ? defaultMaskedError;

    /** COREFIR[62]
     *  SP_INJ_XSTOP_ERR: Firmware Xstop Error Inject
     */
    (CoreFir, bit(62)) ? defaultMaskedError;

    /** COREFIR[63]
     *  SPRD_PHYP_ERR_INJ: Phyp Xstop via SPRC / SPRD
     */
    (CoreFir, bit(63)) ? callout2ndLvlMed;
};

################################################################################
# EX Chiplet L2FIR
################################################################################

rule L2Fir
{
    CHECK_STOP:  L2FIR & ~L2FIR_MASK & ~L2FIR_ACT0 & ~L2FIR_ACT1;
    RECOVERABLE: L2FIR & ~L2FIR_MASK & ~L2FIR_ACT0 &  L2FIR_ACT1;
};

group gL2Fir filter singlebit
{
    /** L2FIR[0]
     *  CACHE_RD_CE
     */
    (L2Fir, bit(0)) ? L2CE;

    /** L2FIR[1]
     *  CACHE_RD_UE
     */
    (L2Fir, bit(1)) ? L2UE;

    /** L2FIR[2]
     *  CACHE_RD_SUE
     */
    (L2Fir, bit(2)) ? defaultMaskedError;

    /** L2FIR[3]
     *  HW_DIR_INTIATED_LINE_DELETE_OCCURRED
     */
    (L2Fir, bit(3)) ? defaultMaskedError;

    /** L2FIR[4]
     *  CACHE_UE_SUE_DETECTED_ON_MODIFIED_LINE_BY_CO
     */
    (L2Fir, bit(4)) ? defaultMaskedError;

    /** L2FIR[5]
     *  CACHE_UE_SUE_DETECTED_ON_NON_MODIFIED_LINE_BY_CO
     */
    (L2Fir, bit(5)) ? defaultMaskedError;

    /** L2FIR[6]
     *  DIR_CE_DETECTED
     */
    (L2Fir, bit(6)) ? L2DirCE;

    /** L2FIR[7]
     *  DIR_UE_DETECTED
     */
    (L2Fir, bit(7)) ? SelfHighThr1;

    /** L2FIR[8]
     *  DIR_STUCK_BIT_CE
     */
    (L2Fir, bit(8)) ? SelfHighThr1;

    /** L2FIR[9]
     *  DIR_SBCE_REPAIR_FAILED
     */
    (L2Fir, bit(9)) ? SelfHighThr1;

    /** L2FIR[10]
     *  MULTIPLE_DIR_ERRORS_DETECTED
     */
    (L2Fir, bit(10)) ? defaultMaskedError;

    /** L2FIR[11]
     *  LRU_READ_ERROR_DETECTED
     */
    (L2Fir, bit(11)) ? SelfHighThr32PerDay;

    /** L2FIR[12]
     *  RC_POWERBUS_DATA_TIMEOUT
     */
    (L2Fir, bit(12)) ? callout2ndLvlMed;

    /** L2FIR[13]
     *  NCU_POWERBUS_DATA_TIMEOUT
     */
    (L2Fir, bit(13)) ? callout2ndLvlMed;

    /** L2FIR[14]
     *  HW_CONTROL_ERROR
     */
    (L2Fir, bit(14)) ? L2ChipLevel2;

    /** L2FIR[15]
     *  LRU_ALL_MEMBERS_IN_CGC_ARE_LINE_DELETED
     */
    (L2Fir, bit(15)) ? SelfHighThr1;

    /** L2FIR[16]
     *  CACHE_INHIBITED_HIT_CACHEABLE_ERROR
     */
    (L2Fir, bit(16)) ? SelfHighThr1;

    /** L2FIR[17]
     *  RC_LOAD_RECIVED_PB_CRESP_ADR_ERR
     */
    (L2Fir, bit(17)) ? SelfHighThr1UE;

    /** L2FIR[18]
     *  RC_STORE_RECIVED_PB_CRESP_ADR_ERR
     */
    (L2Fir, bit(18)) ?  SelfHighThr1;

    /** L2FIR[19]
     *  RC_POWBUS_DATA_CE_ERR_FROM_F2CHK
     */
    (L2Fir, bit(19)) ? SelfHighThr32PerDay;

    /** L2FIR[20]
     *  RC_POWBUS_DATA_UE_ERR_FROM_F2CHK
     */
    (L2Fir, bit(20)) ? SelfHighThr1UE;

    /** L2FIR[21]
     *  RC_POWBUS_DATA_SUE_ERR_FROM_F2CHK
     */
    (L2Fir, bit(21)) ? defaultMaskedError;

    /** L2FIR[22]
     *  CO_ICSW_UE_SUE_DATA_ERR_FROM_F2CHK
     */
    (L2Fir, bit(22)) ? SelfHighThr1;

    /** L2FIR[23]
     *  RC_LOAD_RECIVED_PB_CRESP_ADR_ERR_FOR_HYP
     */
    (L2Fir, bit(23)) ? defaultMaskedError;

    /** L2FIR[24]
     *  RCDAT_RD_PARITY_ERR
     */
    (L2Fir, bit(24)) ? SelfHighThr1UE;

    /** L2FIR[25]
     *  CO_ICSW_RTY_BUSY_ABT_ERR
     */
    (L2Fir, bit(25)) ? defaultMaskedError;

    /** L2FIR[26]
     *  HA_LOG_STOP_SW_ERR
     */
    (L2Fir, bit(26)) ? calloutSelfAndLevel2MedThr1;

    /** L2FIR[27]
     *  RC_LOAD_RECEIVED_PB_ACK_DEAD_FROM_FOREIGN0
     */
    (L2Fir, bit(27)) ? callout2ndLvlMedThr1;

    /** L2FIR[28]
     *  RC_LOAD_RECEIVED_PB_ACK_DEAD_FROM_FOREIGN1
     */
    (L2Fir, bit(28)) ? callout2ndLvlMedThr1;

    /** L2FIR[29]
     *  RC_STORE_RECEIVED_PB_ACK_DEAD_FROM_FOREIGN0
     */
    (L2Fir, bit(29)) ? callout2ndLvlMedThr1;

    /** L2FIR[30]
     *  RC_STORE_RECEIVED_PB_ACK_DEAD_FROM_FOREIGN1
     */
    (L2Fir, bit(30)) ? callout2ndLvlMedThr1;

    /** L2FIR[31]
     *  ILLEGAL_MPALOG_TPID_SW_ERR
     */
    (L2Fir, bit(31)) ? defaultMaskedError;

    /** L2FIR[32]
     *  UNEXP_HA_ST_ERR
     */
    (L2Fir, bit(32)) ? defaultMaskedError;

    /** L2FIR[33]
     *  HA_LINE_IN_CONS_CACHE_ERR
     */
    (L2Fir, bit(33)) ? defaultMaskedError;

    /** L2FIR[34]
     *  HA_TABLE_IN_PROD_CACHE_ERR
     */
    (L2Fir, bit(34)) ? defaultMaskedError;

    /** L2FIR[35]
     *  ILLEGAL_LOG_STOP_SW_ERR
     */
    (L2Fir, bit(35)) ? defaultMaskedError;

    /** L2FIR[48]
     *  SCOM_ERR1: scom error
     */
    (L2Fir, bit(48)) ? defaultMaskedError;

    /** L2FIR[49]
     *  SCOM_ERR2: scom error
     */
    (L2Fir, bit(49)) ? defaultMaskedError;
};

################################################################################
# EX Chiplet L3FIR
################################################################################

rule L3Fir
{
    CHECK_STOP:  L3FIR & ~L3FIR_MASK & ~L3FIR_ACT0 & ~L3FIR_ACT1;
    RECOVERABLE: L3FIR & ~L3FIR_MASK & ~L3FIR_ACT0 &  L3FIR_ACT1;
};

group gL3Fir filter singlebit
{
    /** L3FIR[0]
     *  PowerBus Command Error - Overrun condition.
     */
    (L3Fir, bit(0)) ? SelfLowLevel2MedThr1;

    /** L3FIR[1]
     *  PowerBus Data Error - Overrun condition.
     */
    (L3Fir, bit(1)) ? SelfLowLevel2MedThr1;

    /** L3FIR[2]
     *  Spare
     */
    (L3Fir, bit(2)) ? defaultMaskedError;

    /** L3FIR[3]
     * Spare
     */
    (L3Fir, bit(3)) ? defaultMaskedError;

    /** L3FIR[4]
     *  L3 Cache CE, no line delete requested.
     */
    (L3Fir, bit(4)) ? L3CE;

    /** L3FIR[5]
     *  L3 Cache UE.
     */
    (L3Fir, bit(5)) ? L3UE;

    /** L3FIR[4,5]
     *  L3 Cache UE with CE.
     */
    (L3Fir, bit(4,5)) ? L3UE;

    /** L3FIR[6]
     *  L3 Cache SUE.
     */
    (L3Fir, bit(6)) ? defaultMaskedError;

    /** L3FIR[7]
     *  L3 Cache Write CE from PowerBus
     */
    (L3Fir, bit(7)) ? SelfMedThr32PerDay;

    /** L3FIR[8]
     *  L3 Cache Write UE from PowerBus
     */
    (L3Fir, bit(8)) ? SelfHighThr1UE;

    /** L3FIR[9]
     *  L3 Cache Write SUE from PowerBus
     */
    (L3Fir, bit(9)) ? defaultMaskedError;

    /** L3FIR[10]
     *  L3 Cache Write CE from L2
     */
    (L3Fir, bit(10)) ? SelfHighThr32PerDay;

    /** L3FIR[11]
     *  L3 Cache Write UE from L2
     */
    (L3Fir, bit(11)) ? L3UE;

    /** L3FIR[12]
     *  L3 Cache Write SUE from L2
     */
    (L3Fir, bit(12)) ? defaultMaskedError;

    /** L3FIR[13]
     *  L3 Dir Read CE
     */
    (L3Fir, bit(13)) ? L3DirCE;

    /** L3FIR[14]
     *  L3 Dir Read UE
     */
    (L3Fir, bit(14)) ? SelfHighThr1UE;

    /** L3FIR[15]
     *  L3 Dir Read \"Phantom Error\"
     */
    (L3Fir, bit(15)) ? defaultMaskedError;

    /** L3FIR[16]
     *  L3 Store Address Error
     */
    (L3Fir, bit(16)) ? SelfLowLevel2MedThr1;

    /** L3FIR[17]
     *  L3 Load Address Error (from Prefetch Machine)
     */
    (L3Fir, bit(17)) ? SelfHighThr1;

    /** L3FIR[18]
     *  L3 Address Hang
     */
    (L3Fir, bit(18)) ? defaultMaskedError;

    /** L3FIR[19]
     *  Reserved field (Access type is l3_flink_0_load_ack_dead)
     */
    (L3Fir, bit(19)) ? callout2ndLvlMedThr1;

    /** L3FIR[20]
     *  Reserved field (Access type is l3_flink_0_store_ack_dead)
     */
    (L3Fir, bit(20)) ? callout2ndLvlMedThr1;

    /** L3FIR[21]
     *  Reserved field (Access type is l3_flink_1_load_ack_dead)
     */
    (L3Fir, bit(21)) ? callout2ndLvlMedThr1;

    /** L3FIR[22]
     *  Reserved field (Access type is l3_flink_1_store_ack_dead)
     */
    (L3Fir, bit(22)) ? callout2ndLvlMedThr1;

    /** L3FIR[23]
     *  L3 Machine Hang
     */
    (L3Fir, bit(23)) ? SelfLowLevel2MedThr1;

    /** L3FIR[24]
     *  L3 Hw Control Error
     */
    (L3Fir, bit(24)) ? SelfHighThr1;

    /** L3FIR[25]
     *  L3 Snoop Sw error detected
     */
    (L3Fir, bit(25)) ? SelfLowLevel2MedThr1;

    /** L3FIR[26]
     *  L3 Line Delete CE done
     */
    (L3Fir, bit(26)) ? defaultMaskedError;

    /** L3FIR[27]
     *  L3 DRAM Logic Error
     */
    (L3Fir, bit(27)) ? SelfHighThr1;

    /** L3FIR[28]
     *  L3 LRU SRAM Logic Recoverable Error
     */
    (L3Fir, bit(28)) ? SelfHighThr32PerDay;

    /** L3FIR[29]
     *  L3 Cache Congruence Class Deleted
     */
    (L3Fir, bit(29)) ? SelfHighThr1;

    /** L3FIR[30]
     *  L3 Cache Timer Refresh Error
     */
    (L3Fir, bit(30)) ? SelfHighThr1;

    /** L3FIR[31]
     *  L3 HA Consumer SW Access Error
     */
    (L3Fir, bit(31)) ? defaultMaskedError;

    /** L3FIR[32]
     *  L3 HA Producer SW Access Error
     */
    (L3Fir, bit(32)) ? defaultMaskedError;

    /** L3FIR[33]
     *  L3 HA Line In Consumer Cache Error
     */
    (L3Fir, bit(33)) ? defaultMaskedError;

    /** L3FIR[34]
     *  L3 HA Table In Producer Cache Error
     */
    (L3Fir, bit(34)) ? defaultMaskedError;

    /** L3FIR[35]
     *  L3 HA Log Overflow
     */
    (L3Fir, bit(35)) ? callout2ndLvlMed;

    /** L3FIR[36]
     *  SCOM_ERR: scom error
     */
    (L3Fir, bit(36)) ? defaultMaskedError;

    /** L3FIR[37]
     *  SCOM_ERR: scom error
     */
    (L3Fir, bit(37)) ? defaultMaskedError;
};

################################################################################
# EX Chiplet NCUFIR
################################################################################
# Based on p8dd1_mss_FFDC_37_reviewed
###############################################################################
rule NcuFir
{
    CHECK_STOP:  NCUFIR & ~NCUFIR_MASK & ~NCUFIR_ACT0 & ~NCUFIR_ACT1;
    RECOVERABLE: NCUFIR & ~NCUFIR_MASK & ~NCUFIR_ACT0 &  NCUFIR_ACT1;
};

group gNcuFir filter singlebit
{
    /** NCUFIR[0]
     *  CONTROL_ERR: H/W control error.
     */
    (NcuFir, bit(0)) ? SelfHighThr1;

    /** NCUFIR[1]
     *  TLBIE_SW_ERR: TLBIE received illegal AP/LP field from core.
     */
    (NcuFir, bit(1)) ? SelfLowLevel2MedThr1;

    /** NCUFIR[2]
     *  ST_ADDR_ERR: Store address machine or TLBIE/sync machine received 
     *  addr_err cresp.
     */
    (NcuFir, bit(2)) ? SelfLowLevel2MedThr1;

    /** NCUFIR[3]
     *  LD_ADDR_ERR: Load address machine received addr_err cresp.
     */
    (NcuFir, bit(3)) ? SelfLowLevel2MedThr1;

    /** NCUFIR[4]
     *  ST_FOREIGN0_ACK_DEAD: Store received ack_dead on foreign link0.
     */
    (NcuFir, bit(4)) ? SelfHighThr32PerDay;

    /** NCUFIR[5]
     *  ST_FOREIGN1_ACK_DEAD: Store received ack_dead on foreign link1.
     */
    (NcuFir, bit(5)) ? SelfHighThr32PerDay;

    /** NCUFIR[6]
     *  LD_FOREIGN0_ACK_DEAD: Load received ack_dead on foreign link0.
     */
    (NcuFir, bit(6)) ? SelfHighThr32PerDay;

    /** NCUFIR[7]
     *  LD_FOREIGN1_ACK_DEAD: Load received ack_dead on foreign link1.
     */
    (NcuFir, bit(7)) ? SelfHighThr32PerDay;

    /** NCUFIR[8]
     *  STQ_DATA_PARITY_ERR: Store data parity error from regfile detected.
     */
    (NcuFir, bit(8)) ? SelfHighThr1UE;

    /** NCUFIR[9]
     *  STORE_TIMEOUT: Store timed out on PB.
     */
    (NcuFir, bit(9)) ? SelfLowLevel2MedThr1;

    /** NCUFIR[10]
     *  TLBIE_MASTER_TIMEOUT: TLBIE master timed out on PB.
     */
    (NcuFir, bit(10)) ? SelfLowLevel2MedThr1;

    /** NCUFIR[11]
     *  TLBIE_SNOOP_TIMEOUT: TLBIE snooper timed out waiting for core.
     */
    (NcuFir, bit(11)) ? SelfHighThr1;

    /** NCUFIR[12]
     *  HTM_IMA_TIMEOUT: HTM/IMA address machine timed out on PB.
     */
    (NcuFir, bit(12)) ? SelfLowLevel2MedThr1;

    /** NCUFIR[13]
     *  IMA_CRESP_ADDR_ERR: IMA received addr_err cresp.
     */
    (NcuFir, bit(13)) ? SelfLowLevel2MedThr1;

    /** NCUFIR[14]
     *  IMA_FOREIGN0_ACK_DEAD: IMA received ack_dead on foreign link0.
     */
    (NcuFir, bit(14)) ? SelfLowLevel2MedThr1;

    /** NCUFIR[15]
     *  IMA_FOREIGN1_ACK_DEAD: IMA received ack_dead on foreign link1.
     */
    (NcuFir, bit(15)) ? SelfLowLevel2MedThr1;

    /** NCUFIR[16]
     *  HTM_GOT_ACK_DEAD: HTM received ack_dead on any foreign link.
     */
    (NcuFir, bit(16)) ? defaultMaskedError;

    /** NCUFIR[17]
     *  PMISC_CRESP_ADDR_ERR: PMISC received address error cresp.
     */

    (NcuFir, bit(17)) ? calloutParentProcHighThr1;

    /** NCUFIR[18]
     *  TLBIE_CONTROL_ERR: TLBIE control error.
     */
    (NcuFir, bit(18)) ? SelfLowLevel2MedThr1;

    /** NCUFIR[19|20|21|22|23]
     *  SPARE
     */
    (NcuFir, bit(19|20|21|22|23)) ? defaultMaskedError;

    /** NCUFIR[24]
     *  SCOM_ERR1: scom error
     */
    (NcuFir, bit(24)) ? defaultMaskedError;

    /** NCUFIR[25]
     *  SCOM_ERR2: scom error
     */
    (NcuFir, bit(25)) ? defaultMaskedError;
};

 ##############################################################################
 #                                                                            #
 #    #                                  ###                                  #
 #   # #    ##  ##### ###  ###  #   #   #   # #     #    ###   ###  ###  ###  #
 #  #   #  #  #   #    #  #   # ##  #   #     #    # #  #     #     #   #     #
 # ####### #      #    #  #   # # # #   #     #   #####  ###   ###  ##   ###  #
 # #     # #  #   #    #  #   # #  ##   #   # #   #   #     #     # #       # #
 # #     #  ##    #   ###  ###  #   #    ###  ### #   #  ###   ###  ###  ###  #
 #                                                                            #
 ##############################################################################

# Include the common action set.
.include "CommonActions.rule"

# When analyzing CoreFir, check for/handle core checkstop
actionclass analyzeCore
{
    funccall("CheckCoreCheckstop");
    analyze(gCoreFir);
    funccall("MaskIfCoreCheckstop");
    funccall("RestartTraceArray");
};

# Chiplet recoverable FIR indicated Core checkstop, so take actions for
# handling core checkstop. Analyze CoreFir.
actionclass analyzeCoreUnitCheckstop
{
    funccall("CheckCoreCheckstop");
    funccall("SetCoreCheckstopCause");
    analyze(gCoreFir);
    funccall("MaskIfCoreCheckstop");
};

actionclass analyzeExLFir
{
    analyze(gExLFir);
    funccall("RestartTraceArray");
};

actionclass analyzeL2Fir
{
    analyze(gL2Fir);
    funccall("RestartTraceArray");
};

actionclass analyzeL3Fir
{
    analyze(gL3Fir);
    funccall("RestartTraceArray");
};

actionclass analyzeNcuFir
{
    analyze(gNcuFir);
    funccall("RestartTraceArray");
};

actionclass L3DirCE
{
    calloutSelfHigh;
    threshold( field(32 / day), mfg_file(P8EX_L3_DIR_CES) );
};

actionclass L3UE
{
    SelfHighThr1UE;
    funccall("L3UE");
};

actionclass L3CE
{
    calloutSelfHigh;
    threshold( field(32 / day), mfg_file(P8EX_L3_CACHE_CES) );
    funccall("L3CE");
};


actionclass L2CE
{
    calloutSelfHigh;
    threshold( field(32 / day), mfg_file(P8EX_L2_CACHE_CES) );
    funccall("L2CE");
};

actionclass L2UE
{
    SelfHighThr1UE;
    funccall("L2UE");
};

actionclass L2DirCE
{
    calloutSelfHigh;
    threshold( field(32 / day), mfg_file(P8EX_L2_DIR_CES) );
};

actionclass L2ChipLevel2
{
    calloutParentProcLow;
    callout2ndLvlMed;
    threshold1;
};

actionclass calloutSelfHighSUE
{
    SelfHighThr1;
    flag(SUE);
};

actionclass calloutParentProcLow
{
    callout(connected(TYPE_PROC),MRU_LOW);
};

/** calls out Ex if threshold exceeds. Calls for second level support as well*/
actionclass SelfAndLevel2MedThr5PerHr
{
    calloutSelfMed;
    callout2ndLvlMed;
    threshold5phour;
};

/** callouts Proc on first instance. Calls for second level support as well*/
actionclass calloutProcLow2ndLvlMedThr1SUE
{
    calloutParentProcLow;
    callout2ndLvlMed;
    threshold1;
    flag(SUE);
};

/** Callouts core with high priority on first instance if sparing not done */
actionclass spareOrSelfHighThr1
{
    #FIXME RTC 23127  Need to figure out extension bit to determine if sparing
    #      is  done
    TBDDefaultCallout;
};

/** callout connected parent proc with high priority.*/
actionclass calloutParentProcHigh
{
    callout(connected(TYPE_PROC),MRU_HIGH);
};

/** callout parent proc. Threshold is 32 events per day */
actionclass calloutParentChipHighThr32
{
    calloutParentProcHigh;
    threshold32pday;
};
OpenPOWER on IntegriCloud