|
root / base / usr / src / cmd / fm / eversholt / files / common / pciex.esc
pciex.esc Plain Text 2096 lines 81.5 KB
   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
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License (the "License").
 * You may not use this file except in compliance with the License.
 *
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 * or http://www.opensolaris.org/os/licensing.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 * If applicable, add the following below this CDDL HEADER, with the
 * fields enclosed by brackets "[]" replaced with your own identifying
 * information: Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 */
/*
 * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 */

#pragma dictionary "PCIEX"

#include <fm/topo_hc.h>

/*
 * FIT rates - assume leaf devices are somewhat less reliable than
 * root complexes, switches and bridges
 */
#define PCIEX_RC_FIT 500
#define PCIEX_SW_FIT 500
#define PCIEX_BDG_FIT 500
#define PCIEX_DEV_FIT 1000
#define PCIEX_RC_INV_FIT 500
#define PCIEX_DEV_INV_FIT 1000
#define PCIEX_RC_NR_FIT 500
#define PCIEX_SW_NR_FIT 500
#define PCIEX_BDG_NR_FIT 500
#define PCIEX_DEV_NR_FIT 1000
#define PCIEX_BUS_FIT 500
#define PCIEX_BUS_NR_FIT 500

/*
 * SERD parameters.
 * 
 * PCI Express correctable link errors are automatically handled by the
 * hardware, so have relatively little impact and we can allow quite a
 * high frequency. We will also be quite conservative about nonfatal internal
 * errors reported by the driver.
 *
 * Nonfatal dpe errors (ptlp/ecrc errors) have to be recovered by the hardened
 * driver which may cause intermittant performance/responsiveness problems, so
 * we have tighter serd parameters for these. These are most likely errors in
 * buffers/caches within devices and bridges, so use similar rates to cpu
 * data cache parity errors.
 */
#define CORRLINK_COUNT 6
#define CORRLINK_TIME 2h
#define BTLP_COUNT 6
#define BTLP_TIME 2h
#define BDLLP_COUNT 6
#define BDLLP_TIME 2h
#define RTO_COUNT 6
#define RTO_TIME 2h
#define RNR_COUNT 6
#define RNR_TIME 2h
#define RE_COUNT 6
#define RE_TIME 2h
#define NONFATAL_DPE_COUNT 3
#define NONFATAL_DPE_TIME 168h

/*
 * if the source-id payload is valid, then check it matches
 */
#define SOURCE_ID_MATCHES_BDF \
	(!payloadprop_defined("source-valid") || \
	payloadprop("source-valid") == 0 || \
	payloadprop("source-id") == ((b << 8) | (d << 3) | f))

#define SOURCE_ID_MATCHES_OWN_BDF \
	(payloadprop_defined("source-valid") && \
	payloadprop("source-valid") == 1 && \
	payloadprop("source-id") == (confprop(pciexrc, TOPO_PCI_BDF) + 0))

/*
 * Other useful macros. These use the EXCAP property (PCI Express Capabilities
 * register) to find the type for PCI Express devices, and the CLASS-CODE
 * property (PCI Class Code register) for to find the type of PCI devices behind
 * a PCI Express-PCI bridge - note that 60400 and 60401 are defined as PCI-PCI
 * bridges, everything else is consider a PCI leaf device.
 */
#define	PCIEXFN		pciexbus/pciexdev/pciexfn
#define	PCIEXFNHZ	pciexbus<>/pciexdev<>/pciexfn<>
#define	PCIEXFN1	pciexbus[b]/pciexdev[d]/pciexfn[f]
#define	PCIFN		pcibus/pcidev/pcifn
#define	PCIFNHZ		pcibus<>/pcidev<>/pcifn<>
#define	PCIFN1		pcibus[b]/pcidev[d]/pcifn[f]
#define IS_LF(f) 	(confprop(f, TOPO_PCI_EXCAP) == "pciexdev")
#define IS_BG(f) 	(confprop(f, TOPO_PCI_EXCAP) == "pcibus")
#define IS_SD(f)	(confprop(f, TOPO_PCI_EXCAP) == "pciexswd")
#define IS_SU(f)	(confprop(f, TOPO_PCI_EXCAP) == "pciexswu")
#define	IS_PCI_LF(f)	(confprop_defined(f, TOPO_PCI_CLASS) && \
			confprop(f, TOPO_PCI_CLASS) != "60400" && \
			confprop(f, TOPO_PCI_CLASS) != "60401")

/*
 * define faults
 */
event fault.io.pciex.fw_corrupt@PCIEXFN, FITrate=PCIEX_DEV_FIT, retire=0;
event fault.io.pciex.fw_mismatch@PCIEXFN, FITrate=PCIEX_DEV_FIT, retire=0;

event fault.io.pciex.device-interr@PCIEXFN, FITrate=PCIEX_DEV_FIT;

event fault.io.pciex.device-interr-deg@PCIEXFN, FITrate=PCIEX_DEV_FIT, retire=0;

engine serd.io.pciex.flt-nf@PCIEXFN, N=NONFATAL_DPE_COUNT, T=NONFATAL_DPE_TIME;
event fault.io.pciex.device-interr-unaf@PCIEXFN, FITrate=PCIEX_DEV_FIT,
	engine=serd.io.pciex.flt-nf@PCIEXFN;

engine serd.io.device.nonfatal@PCIEXFN, N=CORRLINK_COUNT, T=CORRLINK_TIME;
event fault.io.pciex.device-interr-corr@PCIEXFN, FITrate=PCIEX_DEV_FIT,
	engine=serd.io.device.nonfatal@PCIEXFN;
engine serd.io.device.nonfatal@PCIEXFN/PCIEXFN,
	N=CORRLINK_COUNT, T=CORRLINK_TIME;
event fault.io.pciex.device-interr-corr@PCIEXFN/PCIEXFN, FITrate=PCIEX_DEV_FIT,
	engine=serd.io.device.nonfatal@PCIEXFN/PCIEXFN;
engine serd.io.device.nonfatal@pciexrc/PCIEXFN,
	N=CORRLINK_COUNT, T=CORRLINK_TIME;
event fault.io.pciex.device-interr-corr@pciexrc/PCIEXFN, FITrate=PCIEX_DEV_FIT,
	engine=serd.io.device.nonfatal@pciexrc/PCIEXFN;

event fault.io.pciex.device-interr@pciexrc, FITrate=PCIEX_RC_FIT;

event fault.io.pciex.device-interr-deg@pciexrc, FITrate=PCIEX_RC_FIT, retire=0;

engine serd.io.pciex.flt-nf@pciexrc, N=NONFATAL_DPE_COUNT, T=NONFATAL_DPE_TIME;
event fault.io.pciex.device-interr-unaf@pciexrc, FITrate=PCIEX_RC_FIT,
	engine=serd.io.pciex.flt-nf@pciexrc;

engine serd.io.device.nonfatal@pciexrc, N=CORRLINK_COUNT, T=CORRLINK_TIME;
event fault.io.pciex.device-interr-corr@pciexrc, FITrate=PCIEX_RC_FIT,
	engine=serd.io.device.nonfatal@pciexrc;

event fault.io.pciex.device-invreq@PCIEXFN, FITrate=PCIEX_DEV_INV_FIT;

event fault.io.pciex.device-invreq@pciexrc, FITrate=PCIEX_RC_FIT;

event fault.io.pciex.device-noresp@PCIEXFN, FITrate=PCIEX_DEV_NR_FIT;

event fault.io.pciex.device-noresp@pciexrc, FITrate=PCIEX_RC_NR_FIT;

event fault.io.pciex.bus-noresp@PCIEXFN, FITrate=PCIEX_BUS_NR_FIT;

event fault.io.pciex.bus-linkerr@PCIEXFN, FITrate=PCIEX_BUS_FIT;

engine serd.io.pciex.corrlink-bus@pciexrc/PCIEXFN,
	N=CORRLINK_COUNT, T=CORRLINK_TIME;
event fault.io.pciex.bus-linkerr-corr@pciexrc/PCIEXFN, FITrate=PCIEX_BUS_FIT,
	engine=serd.io.pciex.corrlink-bus@pciexrc/PCIEXFN;
engine serd.io.pciex.corrlink-bus@PCIEXFN/PCIEXFN,
	N=CORRLINK_COUNT, T=CORRLINK_TIME;
event fault.io.pciex.bus-linkerr-corr@PCIEXFN/PCIEXFN, FITrate=PCIEX_BUS_FIT,
	engine=serd.io.pciex.corrlink-bus@PCIEXFN/PCIEXFN;

/*
 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * Handling of leaf driver detected internal errors. Use serd engine if
 * no service impact - otherwise fail immediately
 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 */
event ereport.io.device.inval_state@PCIEXFN{within(5s)};
event ereport.io.device.no_response@PCIEXFN{within(5s)};
event ereport.io.device.stall@PCIEXFN{within(5s)};
event ereport.io.device.badint_limit@PCIEXFN{within(5s)};
event ereport.io.device.intern_corr@PCIEXFN{within(5s)};
event ereport.io.device.intern_uncorr@PCIEXFN{within(5s)};
event ereport.io.service.lost@PCIEXFN{within(5s)};
event ereport.io.service.degraded@PCIEXFN{within(5s)};
event ereport.io.service.unaffected@PCIEXFN{within(5s)};
event ereport.io.service.restored@PCIEXFN{within(30s)};
event ereport.io.service.lost@PCIFN{within(5s)};
event ereport.io.service.degraded@PCIFN{within(5s)};
event ereport.io.service.unaffected@PCIFN{within(5s)};

event error.io.pciex.noimpact-d@PCIEXFN;
event error.io.pciex.degraded-d@PCIEXFN;
event error.io.pciex.lost-d@PCIEXFN;
event error.io.service.restored@PCIEXFN;
event error.io.service.restored@PCIFN;
event error.io.device.nf-device@PCIEXFN;
event error.io.device.deg-device@PCIEXFN;
event error.io.device.f-device@PCIEXFN;

prop error.io.device.f-device@PCIEXFN (1)->
    ereport.io.device.inval_state@PCIEXFN,
    ereport.io.device.no_response@PCIEXFN,
    ereport.io.device.stall@PCIEXFN,
    ereport.io.device.badint_limit@PCIEXFN,
    ereport.io.device.intern_corr@PCIEXFN,
    ereport.io.device.intern_uncorr@PCIEXFN;

prop error.io.device.f-device@PCIEXFN (0)->
    error.io.pciex.lost-d@PCIEXFN;

prop error.io.device.deg-device@PCIEXFN (1)->
    ereport.io.device.inval_state@PCIEXFN,
    ereport.io.device.no_response@PCIEXFN,
    ereport.io.device.stall@PCIEXFN,
    ereport.io.device.badint_limit@PCIEXFN,
    ereport.io.device.intern_corr@PCIEXFN,
    ereport.io.device.intern_uncorr@PCIEXFN;

prop error.io.device.deg-device@PCIEXFN (1)->
    error.io.pciex.degraded-d@PCIEXFN;

prop error.io.device.nf-device@PCIEXFN (1)->
    ereport.io.device.inval_state@PCIEXFN,
    ereport.io.device.no_response@PCIEXFN,
    ereport.io.device.stall@PCIEXFN,
    ereport.io.device.badint_limit@PCIEXFN,
    ereport.io.device.intern_corr@PCIEXFN,
    ereport.io.device.intern_uncorr@PCIEXFN;

prop error.io.device.nf-device@PCIEXFN (1)->
    error.io.pciex.noimpact-d@PCIEXFN;

/*
 * handling of service impact ereports.
 */
prop error.io.pciex.lost-d@PCIEXFN (1)->
    ereport.io.service.lost@PCIEXFNHZ { is_under(PCIEXFN, PCIEXFNHZ) },
    ereport.io.service.lost@PCIFNHZ { is_under(PCIEXFN, PCIFNHZ) };

prop error.io.pciex.lost-d@PCIEXFN (0)->
    ereport.io.service.unaffected@PCIEXFNHZ { is_under(PCIEXFN, PCIEXFNHZ) },
    ereport.io.service.unaffected@PCIFNHZ { is_under(PCIEXFN, PCIFNHZ) },
    ereport.io.service.degraded@PCIEXFNHZ { is_under(PCIEXFN, PCIEXFNHZ) },
    ereport.io.service.degraded@PCIFNHZ { is_under(PCIEXFN, PCIFNHZ) };

prop error.io.pciex.degraded-d@PCIEXFN (1)->
    ereport.io.service.degraded@PCIEXFNHZ { is_under(PCIEXFN, PCIEXFNHZ) },
    ereport.io.service.degraded@PCIFNHZ { is_under(PCIEXFN, PCIFNHZ) };

prop error.io.pciex.degraded-d@PCIEXFN (0)->
    ereport.io.service.unaffected@PCIEXFNHZ { is_under(PCIEXFN, PCIEXFNHZ) },
    ereport.io.service.unaffected@PCIFNHZ { is_under(PCIEXFN, PCIFNHZ) };

prop error.io.pciex.noimpact-d@PCIEXFN (1)->
    ereport.io.service.unaffected@PCIEXFNHZ { is_under(PCIEXFN, PCIEXFNHZ) },
    ereport.io.service.unaffected@PCIFNHZ { is_under(PCIEXFN, PCIFNHZ) },
    error.io.service.restored@PCIEXFNHZ { is_under(PCIEXFN, PCIEXFNHZ) },
    error.io.service.restored@PCIFNHZ { is_under(PCIEXFN, PCIFNHZ) };

prop error.io.service.restored@PCIEXFN (1)->
    ereport.io.service.lost@PCIEXFN,
    ereport.io.service.degraded@PCIEXFN;

prop error.io.service.restored@PCIEXFN (1)->
    ereport.io.service.restored@PCIEXFN;

/*
 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * A faulty PCI Express hostbridge (root complex) may cause:
 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * - nr-d:		the device not to respond to a valid upstream request
 * - ca-d:		the device to completer abort a valid upstream request
 * - mtlp-d:		a malformed tlp to be transmitted downstream
 * - badreq-d:		a bad downstream request - not CRC error (may cause
 *			completer to respond with ur or ca)
 * - ecrcreq-d:		TLP with end-to-end CRC error transmitted downstream
 * - ecrccomp-d:	TLP with end-to-end CRC error transmitted downstream
 * - poisreq-d:		poisoned request transmitted downstream
 * - poiscomp-d:	poisoned completion transmitted downstream
 * - corrlink:		correctable link or physical level error
 * - fatlink:		fatal link or physical level error
 */
event error.io.pciex.nr-d@pciexrc/PCIEXFN;
event error.io.pciex.ca-d@pciexrc/PCIEXFN;
event error.io.pciex.mtlp-d@pciexrc/PCIEXFN;
event error.io.pciex.fatlink@pciexrc/PCIEXFN;
event error.io.pciex.badreq-d@pciexrc/PCIEXFN;
event error.io.pciex.nf-poisecrc-d@pciexrc/PCIEXFN;
event error.io.pciex.f-poisecrc-d@pciexrc/PCIEXFN;
event error.io.pciex.deg-poisecrc-d@pciexrc/PCIEXFN;
event ereport.io.pciex.dl.btlp@pciexrc{within(5s)};
event ereport.io.pciex.dl.bdllp@pciexrc{within(5s)};
event ereport.io.pciex.dl.rto@pciexrc{within(5s)};
event ereport.io.pciex.dl.rnr@pciexrc{within(5s)};
event ereport.io.pciex.pl.re@pciexrc{within(5s)};
event ereport.io.pciex.dl.btlp@pciexrc/PCIEXFN{within(5s)};
event ereport.io.pciex.dl.bdllp@pciexrc/PCIEXFN{within(5s)};
event ereport.io.pciex.dl.rto@pciexrc/PCIEXFN{within(5s)};
event ereport.io.pciex.dl.rnr@pciexrc/PCIEXFN{within(5s)};
event ereport.io.pciex.pl.re@pciexrc/PCIEXFN{within(5s)};

prop fault.io.pciex.device-noresp@pciexrc (1)->
    error.io.pciex.nr-d@pciexrc/PCIEXFNHZ;

prop fault.io.pciex.device-invreq@pciexrc (1)->
    error.io.pciex.badreq-d@pciexrc/PCIEXFNHZ;

prop fault.io.pciex.device-interr-corr@pciexrc {
    payloadprop_defined("detector") && setserdsuffix("_btlp") &&
    setserdn(BTLP_COUNT) && setserdt(BTLP_TIME) } (0)->
    ereport.io.pciex.dl.btlp@pciexrc,
    ereport.io.pciex.dl.btlp@pciexrc/PCIEXFNHZ;

prop fault.io.pciex.device-interr-corr@pciexrc {
    payloadprop_defined("detector") && setserdsuffix("_bdllp") &&
    setserdn(BDLLP_COUNT) && setserdt(BDLLP_TIME) } (0)->
    ereport.io.pciex.dl.bdllp@pciexrc,
    ereport.io.pciex.dl.bdllp@pciexrc/PCIEXFNHZ;

prop fault.io.pciex.device-interr-corr@pciexrc {
    payloadprop_defined("detector") && setserdsuffix("_rto") &&
    setserdn(RTO_COUNT) && setserdt(RTO_TIME) } (0)->
    ereport.io.pciex.dl.rto@pciexrc,
    ereport.io.pciex.dl.rto@pciexrc/PCIEXFNHZ;

prop fault.io.pciex.device-interr-corr@pciexrc {
    payloadprop_defined("detector") && setserdsuffix("_rnr") &&
    setserdn(RNR_COUNT) && setserdt(RNR_TIME) } (0)->
    ereport.io.pciex.dl.rnr@pciexrc,
    ereport.io.pciex.dl.rnr@pciexrc/PCIEXFNHZ;

prop fault.io.pciex.device-interr-corr@pciexrc {
    payloadprop_defined("detector") && setserdsuffix("_re") &&
    setserdn(RE_COUNT) && setserdt(RE_TIME) } (0)->
    ereport.io.pciex.pl.re@pciexrc,
    ereport.io.pciex.pl.re@pciexrc/PCIEXFNHZ;

prop fault.io.pciex.device-interr-unaf@pciexrc (1)->
    error.io.pciex.nf-poisecrc-d@pciexrc/PCIEXFNHZ;

prop fault.io.pciex.device-interr-deg@pciexrc (1)->
    error.io.pciex.deg-poisecrc-d@pciexrc/PCIEXFNHZ;

prop fault.io.pciex.device-interr@pciexrc (1)->
    error.io.pciex.f-poisecrc-d@pciexrc/PCIEXFNHZ,
    error.io.pciex.ca-d@pciexrc/PCIEXFNHZ,
    error.io.pciex.mtlp-d@pciexrc/PCIEXFNHZ,
    error.io.pciex.fatlink@pciexrc/PCIEXFNHZ;

/*
 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * A faulty PCI Express leaf device or upstream switch port may cause:
 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * - flt-nr-u:		the device not to respond to a valid downstream request
 * - flt-ca-u:		the device to completer abort a valid downstream request
 * - flt-badreq-u:	a bad upstream request - not CRC error (may cause
 *			completer to respond with ur or ca) - leaf only
 * - flt-mtlp-u:	a malformed tlp transmitted upstream - leaf only
 * - flt-ecrcreq-u:	request with end-to-end CRC error transmitted upstream
 * - flt-ecrccomp-u:	compl with end-to-end CRC error transmitted upstream
 * - flt-poisreq-u:	poisoned request transmitted upstream
 * - flt-poiscomp-u:	poisoned completion transmitted upstream
 * - device:		internal error reported by leaf device
 * - corrlink:		correctable link or physical level error
 * - fatlink:		fatal link or physical level error
 */

event error.io.pciex.flt-nr-u@PCIEXFN;
event error.io.pciex.flt-ca-u@PCIEXFN;
event error.io.pciex.flt-mtlp-u@PCIEXFN;
event error.io.pciex.fatlink@PCIEXFN;
event error.io.pciex.flt-badreq-u@PCIEXFN;
event error.io.pciex.flt-nf-poisecrc-u@PCIEXFN;
event error.io.pciex.flt-f-poisecrc-u@PCIEXFN;
event error.io.pciex.flt-deg-poisecrc-u@PCIEXFN;
event ereport.io.pciex.dl.btlp@PCIEXFN{within(5s)};
event ereport.io.pciex.dl.bdllp@PCIEXFN{within(5s)};
event ereport.io.pciex.dl.rto@PCIEXFN{within(5s)};
event ereport.io.pciex.dl.rnr@PCIEXFN{within(5s)};
event ereport.io.pciex.pl.re@PCIEXFN{within(5s)};
event ereport.io.pciex.dl.btlp@PCIEXFN/PCIEXFN{within(5s)};
event ereport.io.pciex.dl.bdllp@PCIEXFN/PCIEXFN{within(5s)};
event ereport.io.pciex.dl.rto@PCIEXFN/PCIEXFN{within(5s)};
event ereport.io.pciex.dl.rnr@PCIEXFN/PCIEXFN{within(5s)};
event ereport.io.pciex.pl.re@PCIEXFN/PCIEXFN{within(5s)};
event ereport.io.device.fw_corrupt@PCIEXFN{within(5s)};
event ereport.io.device.fw_mismatch@PCIEXFN{within(5s)};

prop fault.io.pciex.device-noresp@PCIEXFN { IS_LF(PCIEXFN) } (1)->
    error.io.pciex.flt-nr-u@PCIEXFN;

prop fault.io.pciex.device-noresp@PCIEXFN { IS_SU(PCIEXFN) } (1)->
    error.io.pciex.flt-nr-u@PCIEXFN;

prop fault.io.pciex.device-invreq@PCIEXFN { IS_LF(PCIEXFN) } (1)->
    error.io.pciex.flt-badreq-u@PCIEXFN;

prop fault.io.pciex.device-interr-corr@pciexrc/PCIEXFN {
    payloadprop_defined("detector") && setserdsuffix("_btlp") &&
    setserdn(BTLP_COUNT) && setserdt(BTLP_TIME) } (0)->
    ereport.io.pciex.dl.btlp@pciexrc,
    ereport.io.pciex.dl.btlp@pciexrc/PCIEXFNHZ;

prop fault.io.pciex.device-interr-corr@pciexrc/PCIEXFN {
    payloadprop_defined("detector") && setserdsuffix("_bdllp") &&
    setserdn(BDLLP_COUNT) && setserdt(BDLLP_TIME) } (0)->
    ereport.io.pciex.dl.bdllp@pciexrc,
    ereport.io.pciex.dl.bdllp@pciexrc/PCIEXFNHZ;

prop fault.io.pciex.device-interr-corr@pciexrc/PCIEXFN {
    payloadprop_defined("detector") && setserdsuffix("_rto") &&
    setserdn(RTO_COUNT) && setserdt(RTO_TIME) } (0)->
    ereport.io.pciex.dl.rto@pciexrc,
    ereport.io.pciex.dl.rto@pciexrc/PCIEXFNHZ;

prop fault.io.pciex.device-interr-corr@pciexrc/PCIEXFN {
    payloadprop_defined("detector") && setserdsuffix("_rnr") &&
    setserdn(RNR_COUNT) && setserdt(RNR_TIME) } (0)->
    ereport.io.pciex.dl.rnr@pciexrc,
    ereport.io.pciex.dl.rnr@pciexrc/PCIEXFNHZ;

prop fault.io.pciex.device-interr-corr@pciexrc/PCIEXFN {
    payloadprop_defined("detector") && setserdsuffix("_re") &&
    setserdn(RE_COUNT) && setserdt(RE_TIME) } (0)->
    ereport.io.pciex.pl.re@pciexrc,
    ereport.io.pciex.pl.re@pciexrc/PCIEXFNHZ;

prop fault.io.pciex.device-interr-corr@PCIEXFN/PCIEXFN {
    !IS_SD(PCIEXFN/PCIEXFN) &&
    payloadprop_defined("detector") && setserdsuffix("_btlp") &&
    setserdn(BTLP_COUNT) && setserdt(BTLP_TIME) } (0)->
    ereport.io.pciex.dl.btlp@PCIEXFN,
    ereport.io.pciex.dl.btlp@PCIEXFN/PCIEXFNHZ;

prop fault.io.pciex.device-interr-corr@PCIEXFN/PCIEXFN {
    !IS_SD(PCIEXFN/PCIEXFN) &&
    payloadprop_defined("detector") && setserdsuffix("_bdllp") &&
    setserdn(BDLLP_COUNT) && setserdt(BDLLP_TIME) } (0)->
    ereport.io.pciex.dl.bdllp@PCIEXFN,
    ereport.io.pciex.dl.bdllp@PCIEXFN/PCIEXFNHZ;

prop fault.io.pciex.device-interr-corr@PCIEXFN/PCIEXFN {
    !IS_SD(PCIEXFN/PCIEXFN) &&
    payloadprop_defined("detector") && setserdsuffix("_rto") &&
    setserdn(RTO_COUNT) && setserdt(RTO_TIME) } (0)->
    ereport.io.pciex.dl.rto@PCIEXFN,
    ereport.io.pciex.dl.rto@PCIEXFN/PCIEXFNHZ;

prop fault.io.pciex.device-interr-corr@PCIEXFN/PCIEXFN {
    !IS_SD(PCIEXFN/PCIEXFN) &&
    payloadprop_defined("detector") && setserdsuffix("_rnr") &&
    setserdn(RNR_COUNT) && setserdt(RNR_TIME) } (0)->
    ereport.io.pciex.dl.rnr@PCIEXFN,
    ereport.io.pciex.dl.rnr@PCIEXFN/PCIEXFNHZ;

prop fault.io.pciex.device-interr-corr@PCIEXFN/PCIEXFN {
    !IS_SD(PCIEXFN/PCIEXFN) &&
    payloadprop_defined("detector") && setserdsuffix("_re") &&
    setserdn(RE_COUNT) && setserdt(RE_TIME) } (0)->
    ereport.io.pciex.pl.re@PCIEXFN,
    ereport.io.pciex.pl.re@PCIEXFN/PCIEXFNHZ;

prop fault.io.pciex.device-interr-unaf@PCIEXFN { IS_SU(PCIEXFN) } (1)->
    error.io.pciex.flt-nf-poisecrc-u@PCIEXFN;

prop fault.io.pciex.device-interr-corr@PCIEXFN { IS_LF(PCIEXFN) } (0)->
    error.io.device.nf-device@PCIEXFN;

prop fault.io.pciex.device-interr-unaf@PCIEXFN { IS_LF(PCIEXFN) } (1)->
    error.io.pciex.flt-nf-poisecrc-u@PCIEXFN;

prop fault.io.pciex.device-interr-deg@PCIEXFN { IS_SU(PCIEXFN) } (1)->
    error.io.pciex.flt-deg-poisecrc-u@PCIEXFN;

prop fault.io.pciex.device-interr@PCIEXFN { IS_SU(PCIEXFN) } (1)->
    error.io.pciex.flt-f-poisecrc-u@PCIEXFN,
    error.io.pciex.flt-ca-u@PCIEXFN,
    error.io.pciex.fatlink@PCIEXFN;

prop fault.io.pciex.device-interr-deg@PCIEXFN { IS_LF(PCIEXFN) } (1)->
    error.io.pciex.flt-deg-poisecrc-u@PCIEXFN,
    error.io.device.deg-device@PCIEXFN;

prop fault.io.pciex.device-interr@PCIEXFN { IS_LF(PCIEXFN) } (1)->
    error.io.pciex.flt-f-poisecrc-u@PCIEXFN,
    error.io.device.f-device@PCIEXFN,
    error.io.pciex.flt-ca-u@PCIEXFN,
    error.io.pciex.flt-mtlp-u@PCIEXFN,
    error.io.pciex.fatlink@PCIEXFN;

prop fault.io.pciex.fw_corrupt@PCIEXFN { IS_LF(PCIEXFN) } (1)->
    ereport.io.device.fw_corrupt@PCIEXFN;

prop fault.io.pciex.fw_corrupt@PCIEXFN { IS_LF(PCIEXFN) } (0)->
    ereport.io.service.lost@PCIEXFN,
    ereport.io.service.degraded@PCIEXFN;

prop fault.io.pciex.fw_mismatch@PCIEXFN { IS_LF(PCIEXFN) } (1)->
    ereport.io.device.fw_mismatch@PCIEXFN;

prop fault.io.pciex.fw_mismatch@PCIEXFN { IS_LF(PCIEXFN) } (0)->
    ereport.io.service.lost@PCIEXFN,
    ereport.io.service.degraded@PCIEXFN;

/*
 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * A faulty PCI Express downstream switch port may cause
 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * - nr-d:		the device not to respond to an upstream request
 * - ca-d:		the device to completer abort an upstream request
 * - ecrcreq-d:		TLP with end-to-end CRC error transmitted upstream
 * - ecrccomp-d:	TLP with end-to-end CRC error transmitted upstream
 * - poisreq-d:		poisoned request transmitted upstream
 * - poiscomp-d:	poisoned completion transmitted upstream
 * - corrlink:		correctable link or physical level error
 * - fatlink:		fatal link or physical level error
 */

event error.io.pciex.nr-d@PCIEXFN/PCIEXFN;
event error.io.pciex.ca-d@PCIEXFN/PCIEXFN;
event error.io.pciex.fatlink@PCIEXFN/PCIEXFN;
event error.io.pciex.nf-poisecrc-d@PCIEXFN/PCIEXFN;
event error.io.pciex.f-poisecrc-d@PCIEXFN/PCIEXFN;
event error.io.pciex.deg-poisecrc-d@PCIEXFN/PCIEXFN;

prop fault.io.pciex.device-noresp@PCIEXFN { IS_SD(PCIEXFN) } (1)->
    error.io.pciex.nr-d@PCIEXFN/PCIEXFNHZ;

prop fault.io.pciex.device-interr-corr@PCIEXFN { IS_SD(PCIEXFN) &&
    payloadprop_defined("detector") && setserdsuffix("_btlp") &&
    setserdn(BTLP_COUNT) && setserdt(BTLP_TIME) } (0)->
    ereport.io.pciex.dl.btlp@PCIEXFN,
    ereport.io.pciex.dl.btlp@PCIEXFN/PCIEXFNHZ;

prop fault.io.pciex.device-interr-corr@PCIEXFN { IS_SD(PCIEXFN) &&
    payloadprop_defined("detector") && setserdsuffix("_bdllp") &&
    setserdn(BDLLP_COUNT) && setserdt(BDLLP_TIME) } (0)->
    ereport.io.pciex.dl.bdllp@PCIEXFN,
    ereport.io.pciex.dl.bdllp@PCIEXFN/PCIEXFNHZ;

prop fault.io.pciex.device-interr-corr@PCIEXFN { IS_SD(PCIEXFN) &&
    payloadprop_defined("detector") && setserdsuffix("_rto") &&
    setserdn(RTO_COUNT) && setserdt(RTO_TIME) } (0)->
    ereport.io.pciex.dl.rto@PCIEXFN,
    ereport.io.pciex.dl.rto@PCIEXFN/PCIEXFNHZ;

prop fault.io.pciex.device-interr-corr@PCIEXFN { IS_SD(PCIEXFN) &&
    payloadprop_defined("detector") && setserdsuffix("_rnr") &&
    setserdn(RNR_COUNT) && setserdt(RNR_TIME) } (0)->
    ereport.io.pciex.dl.rnr@PCIEXFN,
    ereport.io.pciex.dl.rnr@PCIEXFN/PCIEXFNHZ;

prop fault.io.pciex.device-interr-corr@PCIEXFN { IS_SD(PCIEXFN) &&
    payloadprop_defined("detector") && setserdsuffix("_re") &&
    setserdn(RE_COUNT) && setserdt(RE_TIME) } (0)->
    ereport.io.pciex.pl.re@PCIEXFN,
    ereport.io.pciex.pl.re@PCIEXFN/PCIEXFNHZ;

prop fault.io.pciex.device-interr-unaf@PCIEXFN { IS_SD(PCIEXFN) } (1)->
    error.io.pciex.nf-poisecrc-d@PCIEXFN/PCIEXFNHZ;

prop fault.io.pciex.device-interr-deg@PCIEXFN { IS_SD(PCIEXFN) } (1)->
    error.io.pciex.deg-poisecrc-d@PCIEXFN/PCIEXFNHZ;

prop fault.io.pciex.device-interr@PCIEXFN { IS_SD(PCIEXFN) } (1)->
    error.io.pciex.ca-d@PCIEXFN/PCIEXFNHZ,
    error.io.pciex.f-poisecrc-d@PCIEXFN/PCIEXFNHZ,
    error.io.pciex.fatlink@PCIEXFN/PCIEXFNHZ;

/*
 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * A faulty PCIEX bus may cause:
 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * - flt-nr-u:		a device to not respond because the link is down
 * - nr-d:		a device to not respond because the link is down
 * - corrlink:		correctable link or physical level error
 * - fatlink:		fatal link or physical level error
 */

event error.io.pciex.nr-d@PCIEXFN;

prop fault.io.pciex.bus-noresp@PCIEXFN { !IS_SD(PCIEXFN) } (0)->
    error.io.pciex.flt-nr-u@PCIEXFN,
    error.io.pciex.nr-d@PCIEXFN;

prop fault.io.pciex.bus-linkerr-corr@PCIEXFN/PCIEXFN {
    !IS_SD(PCIEXFN/PCIEXFN) &&
    payloadprop_defined("detector") && setserdsuffix("_btlp") &&
    setserdn(BTLP_COUNT) && setserdt(BTLP_TIME) } (0)->
    ereport.io.pciex.dl.btlp@PCIEXFN,
    ereport.io.pciex.dl.btlp@PCIEXFN/PCIEXFNHZ;

prop fault.io.pciex.bus-linkerr-corr@PCIEXFN/PCIEXFN {
    !IS_SD(PCIEXFN/PCIEXFN) &&
    payloadprop_defined("detector") && setserdsuffix("_bdllp") &&
    setserdn(BDLLP_COUNT) && setserdt(BDLLP_TIME) } (0)->
    ereport.io.pciex.dl.bdllp@PCIEXFN,
    ereport.io.pciex.dl.bdllp@PCIEXFN/PCIEXFNHZ;

prop fault.io.pciex.bus-linkerr-corr@PCIEXFN/PCIEXFN {
    !IS_SD(PCIEXFN/PCIEXFN) &&
    payloadprop_defined("detector") && setserdsuffix("_rto") &&
    setserdn(RTO_COUNT) && setserdt(RTO_TIME) } (0)->
    ereport.io.pciex.dl.rto@PCIEXFN,
    ereport.io.pciex.dl.rto@PCIEXFN/PCIEXFNHZ;

prop fault.io.pciex.bus-linkerr-corr@PCIEXFN/PCIEXFN {
    !IS_SD(PCIEXFN/PCIEXFN) &&
    payloadprop_defined("detector") && setserdsuffix("_rnr") &&
    setserdn(RNR_COUNT) && setserdt(RNR_TIME) } (0)->
    ereport.io.pciex.dl.rnr@PCIEXFN,
    ereport.io.pciex.dl.rnr@PCIEXFN/PCIEXFNHZ;

prop fault.io.pciex.bus-linkerr-corr@PCIEXFN/PCIEXFN {
    !IS_SD(PCIEXFN/PCIEXFN) &&
    payloadprop_defined("detector") && setserdsuffix("_re") &&
    setserdn(RE_COUNT) && setserdt(RE_TIME) } (0)->
    ereport.io.pciex.pl.re@PCIEXFN,
    ereport.io.pciex.pl.re@PCIEXFN/PCIEXFNHZ;

prop fault.io.pciex.bus-linkerr-corr@pciexrc/PCIEXFN {
    payloadprop_defined("detector") && setserdsuffix("_btlp") &&
    setserdn(BTLP_COUNT) && setserdt(BTLP_TIME) } (0)->
    ereport.io.pciex.dl.btlp@pciexrc,
    ereport.io.pciex.dl.btlp@pciexrc/PCIEXFNHZ;

prop fault.io.pciex.bus-linkerr-corr@pciexrc/PCIEXFN {
    payloadprop_defined("detector") && setserdsuffix("_bdllp") &&
    setserdn(BDLLP_COUNT) && setserdt(BDLLP_TIME) } (0)->
    ereport.io.pciex.dl.bdllp@pciexrc,
    ereport.io.pciex.dl.bdllp@pciexrc/PCIEXFNHZ;

prop fault.io.pciex.bus-linkerr-corr@pciexrc/PCIEXFN {
    payloadprop_defined("detector") && setserdsuffix("_rto") &&
    setserdn(RTO_COUNT) && setserdt(RTO_TIME) } (0)->
    ereport.io.pciex.dl.rto@pciexrc,
    ereport.io.pciex.dl.rto@pciexrc/PCIEXFNHZ;

prop fault.io.pciex.bus-linkerr-corr@pciexrc/PCIEXFN {
    payloadprop_defined("detector") && setserdsuffix("_rnr") &&
    setserdn(RNR_COUNT) && setserdt(RNR_TIME) } (0)->
    ereport.io.pciex.dl.rnr@pciexrc,
    ereport.io.pciex.dl.rnr@pciexrc/PCIEXFNHZ;

prop fault.io.pciex.bus-linkerr-corr@pciexrc/PCIEXFN {
    payloadprop_defined("detector") && setserdsuffix("_re") &&
    setserdn(RE_COUNT) && setserdt(RE_TIME) } (0)->
    ereport.io.pciex.pl.re@pciexrc,
    ereport.io.pciex.pl.re@pciexrc/PCIEXFNHZ;

prop fault.io.pciex.bus-linkerr@PCIEXFN { !IS_SD(PCIEXFN) } (0)->
    error.io.pciex.fatlink@PCIEXFN;

/*
 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * A faulty pciex-pci bridge may cause
 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * The following errors to propagate onto the PCI Express fabric
 * - flt-nr-u:		the device not to respond to a valid downstream request
 * - flt-ca-u:		the device to completer abort a valid downstream request
 * - flt-ecrcreq-u:	request with end-to-end CRC error transmitted upstream
 * - flt-ecrccomp-u:	compl with end-to-end CRC error transmitted upstream
 * - flt-poisreq-u:	poisoned request transmitted upstream
 * - flt-poiscomp-u:	poisoned completion transmitted upstream
 * - corrlink:		correctable link or physical level error upstream
 * - fatlink:		fatal link or physical level error upstream
 * - sec-interr:	internal error on pci express to pci bridge
 *
 * And the following errors to propagate onto the secondary pci or pci/x bus
 * (these will be handled by code in the pci.esc file).
 * - nr-pw-d:		the device not to respond to a valid upstream request
 * - nr-drw-d:		the device not to respond to a valid upstream request
 * - retry-to-d:	failure to retry an downstream delayed request
 * - ta-pw-d:		the device responds with a ta to a valid upstream
 *			request
 * - ta-drw-d:		the device responds with a ta to a valid upstream
 *			request
 * - ape-d:	address/parity to get corrupted during downstream transmission.
 * - dpe-d:	data/parity to get corrupted during downstream transmission.
 * - scpe-d:	split completion to get corrupted during downstream transmission
 */

event error.io.pci.ape-d@PCIEXFN/PCIFN;
event error.io.pci.f-dpe-d@PCIEXFN/PCIFN;
event error.io.pci.deg-dpe-d@PCIEXFN/PCIFN;
event error.io.pci.nf-dpe-d@PCIEXFN/PCIFN;
event error.io.pci.retry-to-d@PCIEXFN/PCIFN;
event error.io.pci.nr-pw-d@PCIEXFN/PCIFN;
event error.io.pci.nr-drw-d@PCIEXFN/PCIFN;
event error.io.pci.ta-pw-d@PCIEXFN/PCIFN;
event error.io.pci.ta-drw-d@PCIEXFN/PCIFN;
event error.io.pcix.scpe-d@PCIEXFN/PCIFN;
event error.io.pciex.sec-interr@PCIEXFN;
event ereport.io.pci.sec-sta@PCIEXFN{within(5s)};

prop fault.io.pciex.device-noresp@PCIEXFN { IS_BG(PCIEXFN) } (1)->
    error.io.pciex.flt-nr-u@PCIEXFN,
    error.io.pci.retry-to-d@PCIEXFN/PCIFNHZ,
    error.io.pci.nr-pw-d@PCIEXFN/PCIFNHZ,
    error.io.pci.nr-drw-d@PCIEXFN/PCIFNHZ;

prop fault.io.pciex.device-interr-unaf@PCIEXFN { IS_BG(PCIEXFN) } (1)->
    error.io.pciex.flt-nf-poisecrc-u@PCIEXFN,
    error.io.pci.nf-dpe-d@PCIEXFN/PCIFNHZ;

prop fault.io.pciex.device-interr-deg@PCIEXFN { IS_BG(PCIEXFN) } (1)->
    error.io.pciex.flt-deg-poisecrc-u@PCIEXFN,
    error.io.pci.deg-dpe-d@PCIEXFN/PCIFNHZ;

prop fault.io.pciex.device-interr@PCIEXFN { IS_BG(PCIEXFN) } (1)->
    error.io.pciex.flt-f-poisecrc-u@PCIEXFN,
    error.io.pciex.flt-ca-u@PCIEXFN,
    error.io.pciex.flt-mtlp-u@PCIEXFN,
    error.io.pciex.sec-interr@PCIEXFN,
    error.io.pciex.fatlink@PCIEXFN,
    error.io.pci.ta-pw-d@PCIEXFN/PCIFNHZ,
    error.io.pci.ta-drw-d@PCIEXFN/PCIFNHZ,
    error.io.pci.ape-d@PCIEXFN/PCIFNHZ,
    error.io.pcix.scpe-d@PCIEXFN/PCIFNHZ,
    error.io.pci.f-dpe-d@PCIEXFN/PCIFNHZ;

prop fault.io.pciex.device-interr-unaf@PCIEXFN { IS_BG(PCIEXFN) } (0)->
    ereport.io.pci.sec-sta@PCIEXFN;

prop fault.io.pciex.device-interr@PCIEXFN { IS_BG(PCIEXFN) } (0)->
    ereport.io.pci.sec-sta@PCIEXFN;

/*
 * the following rules for ptlp and ecrc faults are split into fatal and
 * nonfatal, depending on the service impact reported by the leaf driver
 */
event error.io.pciex.nf-poisecrc-d@PCIEXFN;
event error.io.pciex.deg-poisecrc-d@PCIEXFN;
event error.io.pciex.f-poisecrc-d@PCIEXFN;
event error.io.pciex.ecrcreq-d@PCIEXFN;
event error.io.pciex.ecrccomp-d@PCIEXFN;
event error.io.pciex.poisreq-d@PCIEXFN;
event error.io.pciex.poiscomp-d@PCIEXFN;
event error.io.pciex.flt-poisreq-u@PCIEXFN;
event error.io.pciex.flt-poiscomp-u@PCIEXFN;
event error.io.pciex.flt-ecrcreq-u@PCIEXFN;
event error.io.pciex.flt-ecrccomp-u@PCIEXFN;

prop error.io.pciex.nf-poisecrc-d@PCIEXFN (1)->
    error.io.pciex.ecrcreq-d@PCIEXFN,
    error.io.pciex.ecrccomp-d@PCIEXFN,
    error.io.pciex.poisreq-d@PCIEXFN,
    error.io.pciex.poiscomp-d@PCIEXFN;

prop error.io.pciex.nf-poisecrc-d@PCIEXFN (1)->
    error.io.pciex.noimpact-d@PCIEXFN;

prop error.io.pciex.f-poisecrc-d@PCIEXFN (1)->
    error.io.pciex.ecrcreq-d@PCIEXFN,
    error.io.pciex.ecrccomp-d@PCIEXFN,
    error.io.pciex.poisreq-d@PCIEXFN,
    error.io.pciex.poiscomp-d@PCIEXFN;

prop error.io.pciex.f-poisecrc-d@PCIEXFN (0)->
    error.io.pciex.lost-d@PCIEXFN;

prop error.io.pciex.deg-poisecrc-d@PCIEXFN (1)->
    error.io.pciex.ecrcreq-d@PCIEXFN,
    error.io.pciex.ecrccomp-d@PCIEXFN,
    error.io.pciex.poisreq-d@PCIEXFN,
    error.io.pciex.poiscomp-d@PCIEXFN;

prop error.io.pciex.deg-poisecrc-d@PCIEXFN (1)->
    error.io.pciex.degraded-d@PCIEXFN;

prop error.io.pciex.flt-nf-poisecrc-u@PCIEXFN (1)->
    error.io.pciex.flt-ecrcreq-u@PCIEXFN,
    error.io.pciex.flt-ecrccomp-u@PCIEXFN,
    error.io.pciex.flt-poisreq-u@PCIEXFN,
    error.io.pciex.flt-poiscomp-u@PCIEXFN;

prop error.io.pciex.flt-nf-poisecrc-u@PCIEXFN (1)->
    error.io.pciex.noimpact-d@PCIEXFN;

prop error.io.pciex.flt-deg-poisecrc-u@PCIEXFN (1)->
    error.io.pciex.flt-ecrcreq-u@PCIEXFN,
    error.io.pciex.flt-ecrccomp-u@PCIEXFN,
    error.io.pciex.flt-poisreq-u@PCIEXFN,
    error.io.pciex.flt-poiscomp-u@PCIEXFN;

prop error.io.pciex.flt-deg-poisecrc-u@PCIEXFN (1)->
    error.io.pciex.degraded-d@PCIEXFN;

prop error.io.pciex.flt-f-poisecrc-u@PCIEXFN (1)->
    error.io.pciex.flt-ecrcreq-u@PCIEXFN,
    error.io.pciex.flt-ecrccomp-u@PCIEXFN,
    error.io.pciex.flt-poisreq-u@PCIEXFN,
    error.io.pciex.flt-poiscomp-u@PCIEXFN;

prop error.io.pciex.flt-f-poisecrc-u@PCIEXFN (0)->
    error.io.pciex.lost-d@PCIEXFN;

/*
 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * declarations
 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 */
event error.io.pciex.fatal@PCIEXFN;
event error.io.pciex.nonfatal@PCIEXFN;
event error.io.pciex.nr-fwd-d@PCIEXFN;
event error.io.pciex.mtlp-fwd-d@PCIEXFN;
event error.io.pciex.flt-ur-u@PCIEXFN;
event error.io.pciex.mtlp-d@PCIEXFN;
event error.io.pciex.ca-d@PCIEXFN;
event error.io.pciex.ca-fwd-d@PCIEXFN;
event error.io.pciex.poisreq-fwd-d@PCIEXFN;
event error.io.pciex.poisreq-fwd-d@pciexrc/PCIEXFN;
event error.io.pciex.poisreq-fwd-d@PCIEXFN/PCIEXFN;
event error.io.pciex.poiscomp-fwd-d@PCIEXFN;
event error.io.pciex.poiscomp-fwd-d@PCIEXFN/PCIEXFN;
event error.io.pciex.ecrcreq-fwd-d@PCIEXFN;
event error.io.pciex.ecrccomp-fwd-d@PCIEXFN;
event error.io.pciex.source-ecrcreq-u@PCIEXFN;
event error.io.pciex.source-ecrccomp-u@PCIEXFN;
event error.io.pciex.source-poiscomp-u@PCIEXFN;
event error.io.pciex.source-poisreq-u@PCIEXFN;
event error.io.pciex.badreq-d@PCIEXFN;
event error.io.pci.badreq-pw-d@PCIEXFN/PCIFN;
event error.io.pci.badreq-drw-d@PCIEXFN/PCIFN;
event error.io.pci.target-ma-d@PCIEXFN;
event error.io.pci.target-rta-d@PCIEXFN;
event error.io.pci.dpdata-pw-d@PCIEXFN/PCIFN;
event error.io.pci.dpdata-dw-d@PCIEXFN/PCIFN;
event error.io.pci.dpdata-dr-d@PCIEXFN/PCIFN;
event error.io.pciex.ca-u@PCIEXFN;
event error.io.pciex.ca-u@PCIEXFN/PCIEXFN;
event error.io.pciex.ca-u@pciexrc/PCIEXFN;
event error.io.pciex.ur-u@PCIEXFN;
event error.io.pciex.ur-u@PCIEXFN/PCIEXFN;
event error.io.pciex.ur-u@pciexrc/PCIEXFN;
event error.io.pciex.nr-u@PCIEXFN;
event error.io.pciex.nr-u@PCIEXFN/PCIEXFN;
event error.io.pciex.nr-u@pciexrc/PCIEXFN;
event error.io.pciex.mtlp-u@PCIEXFN;
event error.io.pciex.mtlp-u@PCIEXFN/PCIEXFN;
event error.io.pciex.mtlp-u@pciexrc/PCIEXFN;
event error.io.pciex.badreq-u@PCIEXFN;
event error.io.pciex.badreq-u@PCIEXFN/PCIEXFN;
event error.io.pciex.badreq-u@pciexrc/PCIEXFN;
event error.io.pciex.poisreq-u@PCIEXFN;
event error.io.pciex.poisreq-u@PCIEXFN/PCIEXFN;
event error.io.pciex.poisreq-u@pciexrc/PCIEXFN;
event error.io.pciex.poiscomp-u@PCIEXFN;
event error.io.pciex.poiscomp-u@PCIEXFN/PCIEXFN;
event error.io.pciex.poiscomp-u@pciexrc/PCIEXFN;
event error.io.pciex.ecrcreq-u@PCIEXFN;
event error.io.pciex.ecrcreq-u@PCIEXFN/PCIEXFN;
event error.io.pciex.ecrccomp-u@PCIEXFN;
event error.io.pciex.ecrccomp-u@PCIEXFN/PCIEXFN;

event ereport.io.pci.ma@PCIEXFN{within(5s)};
event ereport.io.pci.mdpe@PCIEXFN{within(5s)};
event ereport.io.pci.dpe@PCIEXFN{within(5s)};
event ereport.io.pci.rta@PCIEXFN{within(5s)};
event ereport.io.pci.sta@PCIEXFN{within(5s)};
event ereport.io.pciex.dl.dllp@PCIEXFN{within(5s)};
event ereport.io.pciex.pl.te@PCIEXFN{within(5s)};
event ereport.io.pciex.pl.sd@PCIEXFN{within(5s)};
event ereport.io.pciex.tl.fcp@PCIEXFN{within(5s)};
event ereport.io.pciex.tl.rof@PCIEXFN{within(5s)};
event ereport.io.pciex.tl.mtlp@PCIEXFN{within(5s)};
event ereport.io.pciex.tl.ur@PCIEXFN{within(5s)};
event ereport.io.pciex.tl.ca@PCIEXFN{within(5s)};
event ereport.io.pciex.tl.ptlp@PCIEXFN{within(5s)};
event ereport.io.pciex.tl.ecrc@PCIEXFN{within(5s)};
event ereport.io.pciex.tl.uc@PCIEXFN{within(5s)};
event ereport.io.pciex.tl.cto@PCIEXFN{within(5s)};
event ereport.io.pciex.dl.dllp@pciexrc{within(5s)};
event ereport.io.pciex.pl.te@pciexrc{within(5s)};
event ereport.io.pciex.pl.sd@pciexrc{within(5s)};
event ereport.io.pciex.tl.fcp@pciexrc{within(5s)};
event ereport.io.pciex.tl.rof@pciexrc{within(5s)};
event ereport.io.pciex.tl.mtlp@pciexrc{within(5s)};
event ereport.io.pciex.tl.ur@pciexrc{within(5s)};
event ereport.io.pciex.tl.ca@pciexrc{within(5s)};
event ereport.io.pciex.tl.ptlp@pciexrc{within(5s)};
event ereport.io.pciex.tl.ecrc@pciexrc{within(5s)};
event ereport.io.pciex.tl.cto@pciexrc{within(5s)};
event ereport.io.pci.sec-ma@pciexrc{within(5s)};
event ereport.io.pci.sec-mdpe@pciexrc{within(5s)};
event ereport.io.pci.sec-dpe@pciexrc{within(5s)};
event ereport.io.pci.sec-rta@pciexrc{within(5s)};
event ereport.io.pci.sec-sta@pciexrc{within(5s)};
event ereport.io.pci.sec-mdpe@PCIEXFN{within(5s)};
event ereport.io.pci.sec-dpe@PCIEXFN{within(5s)};
event ereport.io.pci.sec-rserr@PCIEXFN{within(5s)};
event ereport.io.pci.sserr@PCIEXFN{within(5s)};
event ereport.io.pci.sec-rserr@pciexrc{within(5s)};
event ereport.io.pciex.rc.fe-msg@pciexrc{within(5s)};
event ereport.io.pciex.rc.nfe-msg@pciexrc{within(5s)};
event ereport.io.pciex.rc.mue-msg@pciexrc{within(5s)};
event ereport.io.pciex.bdg.sec-interr@PCIEXFN{within(5s)};
event ereport.io.pciex.bdg.sec-ude@PCIEXFN{within(5s)};
event ereport.io.pci.target-mdpe@PCIEXFN{within(5s)};
event ereport.io.pci.target-mdpe@PCIFN{within(5s)};

/*
 * handling of fatal and nonfatal error messages propagated up to root complex
 *
 * Use these for errors reported by root-complex on behalf of another device.
 * Can use source-id payload to identify where the message came from.
 */
prop error.io.pciex.fatal@PCIEXFN1 (1)->
    ereport.io.pciex.rc.mue-msg@pciexrc { is_under(pciexrc, PCIEXFN1) },
    ereport.io.pciex.rc.fe-msg@pciexrc { is_under(pciexrc, PCIEXFN1) &&
	SOURCE_ID_MATCHES_BDF };

prop error.io.pciex.fatal@PCIEXFN (0)->
    ereport.io.pci.sserr@PCIEXFN;

prop error.io.pciex.fatal@PCIEXFN { is_under(PCIEXFN1, PCIEXFN) } (0)->
    ereport.io.pci.sserr@PCIEXFN1,
    ereport.io.pci.sec-rserr@PCIEXFN1;

prop error.io.pciex.fatal@PCIEXFN { is_under(pciexrc, PCIEXFN) } (0)->
    ereport.io.pci.sec-rserr@pciexrc;

prop error.io.pciex.nonfatal@PCIEXFN1 (1)->
    ereport.io.pciex.rc.mue-msg@pciexrc { is_under(pciexrc, PCIEXFN1) },
    ereport.io.pciex.rc.nfe-msg@pciexrc { is_under(pciexrc, PCIEXFN1) &&
	SOURCE_ID_MATCHES_BDF };

prop error.io.pciex.nonfatal@PCIEXFN (0)->
    ereport.io.pci.sserr@PCIEXFN;

prop error.io.pciex.nonfatal@PCIEXFN { is_under(PCIEXFN1, PCIEXFN) } (0)->
    ereport.io.pci.sserr@PCIEXFN1,
    ereport.io.pci.sec-rserr@PCIEXFN1;

prop error.io.pciex.nonfatal@PCIEXFN { is_under(pciexrc, PCIEXFN) } (0)->
    ereport.io.pci.sec-rserr@pciexrc;

/*
 * link-level errors - could generate ereports at either end of link
 * 
 * can use may propagations here as these ereports are only seen for these
 * faults.
 */
prop error.io.pciex.fatlink@PCIEXFN { !IS_SD(PCIEXFN) } (0)->
    error.io.pciex.fatal@PCIEXFN;

prop error.io.pciex.fatlink@PCIEXFN { !IS_SD(PCIEXFN) } (0)->
    ereport.io.pciex.dl.dllp@PCIEXFN,
    ereport.io.pciex.tl.fcp@PCIEXFN,
    ereport.io.pciex.tl.rof@PCIEXFN;

prop error.io.pciex.fatlink@PCIEXFN/PCIEXFN { IS_SD(PCIEXFN) } (0)->
    error.io.pciex.fatal@PCIEXFN;

prop error.io.pciex.fatlink@PCIEXFN/PCIEXFN { IS_SD(PCIEXFN) } (0)->
    ereport.io.pciex.dl.dllp@PCIEXFN,
    ereport.io.pciex.pl.te@PCIEXFN,
    ereport.io.pciex.pl.sd@PCIEXFN,
    ereport.io.pciex.tl.fcp@PCIEXFN,
    ereport.io.pciex.tl.rof@PCIEXFN;

prop error.io.pciex.fatlink@pciexrc/PCIEXFN (0)->
    ereport.io.pciex.dl.dllp@pciexrc,
    ereport.io.pciex.pl.te@pciexrc,
    ereport.io.pciex.pl.sd@pciexrc,
    ereport.io.pciex.tl.fcp@pciexrc,
    ereport.io.pciex.tl.rof@pciexrc;

/*
 * bridge internal error
 */
prop error.io.pciex.sec-interr@PCIEXFN { IS_BG(PCIEXFN) } (2) ->
    error.io.pciex.nonfatal@PCIEXFN,
    ereport.io.pciex.bdg.sec-interr@PCIEXFN;

/*
 * downstream poisoned request
 *
 * - poisreq-d cascades down to the leaf device/bridge and any switch ports
 *   on route must raise a ptlp ereport while any switch ports forwarding
 *   the poisoned request must raise sec-mdpe ereports. The originator of the
 *   poisoning (be it root complex or downstream port of a switch) also raises
 *   sec-mdpe. A hardened leaf driver will also raise ptlp. A target-mdpe may
 *   be seen at the leaf (which may be a pci device beyond the bridge).
 *
 * Additionally, the leaf/bridge may treat the request as a ur, which the
 * root complex will see and report an ma. Use flt-ur-u to represent this.
 *
 * The fault can always be recognized and the source identified using the ptlp
 * and sec-mdpe ereports.
 */
prop error.io.pciex.poisreq-d@PCIEXFN (1)->
    error.io.pciex.poisreq-fwd-d@PCIEXFN;

prop error.io.pciex.poisreq-fwd-d@PCIEXFN { IS_SD(PCIEXFN) ||
    IS_SU(PCIEXFN) } (1)->
    error.io.pciex.flt-ur-u@PCIEXFN,
    error.io.pciex.poisreq-fwd-d@PCIEXFN/PCIEXFNHZ; 

prop error.io.pciex.poisreq-fwd-d@pciexrc/PCIEXFN (1)->
    ereport.io.pci.sec-mdpe@pciexrc;

prop error.io.pciex.poisreq-fwd-d@PCIEXFN/PCIEXFN { IS_SU(PCIEXFN) } (0)->
    ereport.io.pci.sec-mdpe@PCIEXFN;

prop error.io.pciex.poisreq-fwd-d@PCIEXFN { IS_SU(PCIEXFN) } (2)->
    ereport.io.pci.dpe@PCIEXFN,
    ereport.io.pciex.tl.ptlp@PCIEXFN;

prop error.io.pciex.poisreq-fwd-d@PCIEXFN { IS_SU(PCIEXFN) } (0)->
    error.io.pciex.nonfatal@PCIEXFN;

prop error.io.pciex.poisreq-fwd-d@PCIEXFN/PCIEXFN { IS_SD(PCIEXFN) } (1)->
    ereport.io.pci.sec-mdpe@PCIEXFN;

prop error.io.pciex.poisreq-fwd-d@PCIEXFN { IS_SD(PCIEXFN) } (0)->
    ereport.io.pci.dpe@PCIEXFN,
    ereport.io.pciex.tl.ptlp@PCIEXFN,
    error.io.pciex.nonfatal@PCIEXFN;

prop error.io.pciex.poisreq-fwd-d@PCIEXFN { IS_BG(PCIEXFN) } (3)->
    ereport.io.pci.dpe@PCIEXFN,
    ereport.io.pciex.tl.ptlp@PCIEXFN,
    error.io.pciex.nonfatal@PCIEXFN;

prop error.io.pciex.poisreq-fwd-d@PCIEXFN { IS_BG(PCIEXFN) } (1)->
    error.io.pci.dpdata-pw-d@PCIEXFN/PCIFNHZ,
    error.io.pci.dpdata-dw-d@PCIEXFN/PCIFNHZ;

prop error.io.pciex.poisreq-fwd-d@PCIEXFN { IS_LF(PCIEXFN) } (1)->
    error.io.pciex.nonfatal@PCIEXFN;

prop error.io.pciex.poisreq-fwd-d@PCIEXFN { IS_LF(PCIEXFN) } (0)->
    ereport.io.pci.dpe@PCIEXFN,
    ereport.io.pciex.tl.ptlp@PCIEXFN,
    error.io.pciex.flt-ur-u@PCIEXFN;

prop error.io.pciex.poisreq-fwd-d@PCIEXFN (0)->
    ereport.io.pci.target-mdpe@PCIEXFN;

/*
 * downstream poisoned completion
 *
 * - poiscomp-d cascades down to the leaf device/bridge and any switch ports on
 *   route must raise ptlp and mdpe ereports.  A hardened leaf driver will also
 *   raise pltp and mdpe. For non-hardened leaf devices, no ptlp/mdpe may be
 *   reported, and though we should still see a nonfatal error reported from
 *   the root complex identifying the leaf device, we won't actually be informed
 *   that the error was an ptlp.
 */
prop error.io.pciex.poiscomp-d@PCIEXFN (1)->
    error.io.pciex.poiscomp-fwd-d@PCIEXFN;

prop error.io.pciex.poiscomp-fwd-d@PCIEXFN (1)->
    error.io.pciex.poiscomp-fwd-d@PCIEXFN/PCIEXFNHZ; 

prop error.io.pciex.poiscomp-fwd-d@PCIEXFN { IS_SU(PCIEXFN) } (2)->
    ereport.io.pci.dpe@PCIEXFN,
    ereport.io.pciex.tl.ptlp@PCIEXFN;

prop error.io.pciex.poiscomp-fwd-d@PCIEXFN { IS_SU(PCIEXFN) } (1)->
    ereport.io.pci.mdpe@PCIEXFN,
    ereport.io.pci.sec-mdpe@PCIEXFN;

prop error.io.pciex.poiscomp-fwd-d@PCIEXFN { IS_SU(PCIEXFN) } (0)->
    error.io.pciex.nonfatal@PCIEXFN;

prop error.io.pciex.poiscomp-fwd-d@PCIEXFN { IS_SD(PCIEXFN) } (0)->
    ereport.io.pci.mdpe@PCIEXFN,
    ereport.io.pci.sec-mdpe@PCIEXFN,
    ereport.io.pci.dpe@PCIEXFN,
    ereport.io.pciex.tl.ptlp@PCIEXFN,
    error.io.pciex.nonfatal@PCIEXFN;

prop error.io.pciex.poiscomp-fwd-d@PCIEXFN { IS_BG(PCIEXFN) } (4)->
    ereport.io.pci.mdpe@PCIEXFN,
    ereport.io.pci.dpe@PCIEXFN,
    ereport.io.pciex.tl.ptlp@PCIEXFN,
    error.io.pciex.nonfatal@PCIEXFN;

prop error.io.pciex.poiscomp-fwd-d@PCIEXFN { IS_BG(PCIEXFN) } (1)->
    error.io.pci.dpdata-dr-d@PCIEXFN/PCIFNHZ;

prop error.io.pciex.poiscomp-fwd-d@PCIEXFN { IS_LF(PCIEXFN) } (1)->
    error.io.pciex.nonfatal@PCIEXFN;

prop error.io.pciex.poiscomp-fwd-d@PCIEXFN { IS_LF(PCIEXFN) } (0)->
    ereport.io.pci.mdpe@PCIEXFN,
    ereport.io.pci.dpe@PCIEXFN,
    ereport.io.pciex.tl.ptlp@PCIEXFN;

/*
 * downstream request with ecrc error.
 *
 * - ecrcreq-d cascades down to the leaf device/bridge and any switches on
 *   route can optionally raise an ecrc ereport. A hardened leaf driver may also
 *   raise ecrc. For non-hardened leaf devices, no ecrc may be reported, and
 *   though we should still see a nonfatal error reported from the root complex
 *   identifying the leaf device, we won't actually be informed that the error
 *   was an ecrc.
 *
 * Additionally, as the leaf/bridge will just throw away the packet, we should
 * eventually get a cto at the root complex - so use an nr-u at the pciex
 * leaf or bridge to get the appropriate behaviour. For the case where the leaf
 * driver wasn't hardened we may be able to identify the leaf device (and
 * therefore any intermediate switches which might have caused the problem)
 * either via a target-ma ereport if available or via the nonfatal error
 * reported from the root complex identifying the leaf device. The combination
 * of a nonfatal error reported from the root complex and a cto from the root
 * complex is sufficient to positively identify this case.
 */
prop error.io.pciex.ecrcreq-d@PCIEXFN (1)->
    error.io.pciex.ecrcreq-fwd-d@PCIEXFN,
    error.io.pciex.ecrcreq-fwd-d@PCIEXFNHZ { is_under(PCIEXFN, PCIEXFNHZ) };

prop error.io.pciex.ecrcreq-fwd-d@PCIEXFN { IS_SU(PCIEXFN) ||
    IS_SD(PCIEXFN) } (1)->
    error.io.pciex.flt-nr-u@PCIEXFN;

prop error.io.pciex.ecrcreq-fwd-d@PCIEXFN { IS_SU(PCIEXFN) ||
    IS_SD(PCIEXFN) } (0)->
    ereport.io.pciex.tl.ecrc@PCIEXFN,
    error.io.pciex.nonfatal@PCIEXFN;

prop error.io.pciex.ecrcreq-fwd-d@PCIEXFN { IS_BG(PCIEXFN) } (3)->
    error.io.pciex.nonfatal@PCIEXFN,
    ereport.io.pciex.tl.ecrc@PCIEXFN,
    error.io.pciex.flt-nr-u@PCIEXFN;

prop error.io.pciex.ecrcreq-fwd-d@PCIEXFN { IS_LF(PCIEXFN) } (2)->
    error.io.pciex.nonfatal@PCIEXFN,
    error.io.pciex.flt-nr-u@PCIEXFN;

prop error.io.pciex.ecrcreq-fwd-d@PCIEXFN { IS_LF(PCIEXFN) } (0)->
    ereport.io.pciex.tl.ecrc@PCIEXFN;

/*
 * downstream completion with ecrc error.
 *
 * - ecrccomp-d cascades down to the leaf device/bridge and any switches on
 *   route can optionally raise an ecrc ereport. A hardened leaf driver may
 *   also raise ecrc. For non-hardened leaf devices, no ecrc may be reported,
 *   and though we should still see a nonfatal error reported from the root
 *   complex identifying the leaf device, we won't actually be informed that
 *   the error was an ecrc.
 *
 * Additionally, as the leaf/bridge will just throw away the packet, we should
 * eventually get a cto. Note the leaf ereports are optional (ie in case driver
 * not hardened) but if we get both ecrc and cto we need to distinguish from
 * cto only which would be an nr-d.
 */
prop error.io.pciex.ecrccomp-d@PCIEXFN (1)->
    error.io.pciex.ecrccomp-fwd-d@PCIEXFN,
    error.io.pciex.ecrccomp-fwd-d@PCIEXFNHZ { is_under(PCIEXFN, PCIEXFNHZ) };

prop error.io.pciex.ecrccomp-fwd-d@PCIEXFN { IS_SU(PCIEXFN) ||
    IS_SD(PCIEXFN) } (0)->
    error.io.pciex.nonfatal@PCIEXFN,
    ereport.io.pciex.tl.ecrc@PCIEXFN;

prop error.io.pciex.ecrccomp-fwd-d@PCIEXFN { IS_BG(PCIEXFN) } (3)->
    error.io.pciex.nonfatal@PCIEXFN,
    ereport.io.pciex.tl.ecrc@PCIEXFN,
    error.io.pciex.nr-d@PCIEXFN;

prop error.io.pciex.ecrccomp-fwd-d@PCIEXFN { IS_LF(PCIEXFN) } (1)->
    error.io.pciex.nonfatal@PCIEXFN;

prop error.io.pciex.ecrccomp-fwd-d@PCIEXFN { IS_LF(PCIEXFN) } (0)->
    ereport.io.pciex.tl.ecrc@PCIEXFN,
    error.io.pciex.nr-d@PCIEXFN;

/*
 * upstream poisoned request
 *
 * - flt-poisreq-u is on the pciex node which generated the fault
 * - source-poisreq-u refers to at least one leaf or bridge device
 *   whose bdf (if leaf) must match the source-id in the payload of the
 *   ereport generated from the root complex.
 * - poisreq-u propagates up to the root complex and any switch ports on
 *   route will raise a ptlp ereport, while any upstream devices generating
 *   or forwarding the poisoned packed will raise an mdpe ereport. The root
 *   complex should also report a ptlp.
 *
 * Additionally, as the root complex may treat the request as a ur, which the
 * leaf/bridge will see (and if hardened report) as an ma (including sending a 
 * ta onto the child pci bus if this was a delayed write).
 *
 * We can always recognize what sort of fault this is from the ptlp (with no
 * sec-mdpe) at the root complex. Recognizing which originating devices may be
 * implicated can be done using the mdpe ereport (for a hardened leaf driver),
 * or for a non-hardened leaf driver by using the source-id payload in the ptlp
 * ereport to identify the originator of the request.  The ptlp/mdpe ereports
 * at the intervening switches will narrow the fault down to a single suspect.
 */

prop error.io.pciex.flt-poisreq-u@PCIEXFN1 { (IS_LF(PCIEXFN) ||
    IS_BG(PCIEXFN)) && is_under(PCIEXFN1, PCIEXFN) } (0)->
    error.io.pciex.source-poisreq-u@PCIEXFN;

prop error.io.pciex.source-poisreq-u@PCIEXFN1 { IS_LF(PCIEXFN1) &&
    SOURCE_ID_MATCHES_BDF && is_under(pciexrc, PCIEXFN1) } (0)->
    ereport.io.pciex.tl.ptlp@pciexrc,
    ereport.io.pciex.tl.ur@pciexrc;

prop error.io.pciex.source-poisreq-u@PCIEXFN { IS_LF(PCIEXFN) } (0)->
    ereport.io.pci.ma@PCIEXFN;

prop error.io.pciex.source-poisreq-u@PCIEXFN { IS_BG(PCIEXFN) &&
    is_under(pciexrc, PCIEXFN) } (0)->
    ereport.io.pciex.tl.ptlp@pciexrc,
    ereport.io.pciex.tl.ur@pciexrc;

prop error.io.pciex.source-poisreq-u@PCIEXFN { IS_BG(PCIEXFN) } (0)->
    ereport.io.pci.ma@PCIEXFN,
    ereport.io.pci.sec-sta@PCIEXFN,
    error.io.pci.ta-drw-d@PCIEXFN/PCIFN;

prop error.io.pciex.flt-poisreq-u@PCIEXFN (1)->
    error.io.pciex.poisreq-u@PCIEXFN;

/*
 * the remaining propagations are also used for poisoned requests propagating
 * up due to a fault behind a pcie-pci bridge
 */
prop error.io.pciex.poisreq-u@PCIEXFN/PCIEXFN (1)->
    error.io.pciex.poisreq-u@PCIEXFN;

prop error.io.pciex.poisreq-u@PCIEXFN { IS_BG(PCIEXFN) } (1)->
    ereport.io.pci.mdpe@PCIEXFN;

prop error.io.pciex.poisreq-u@PCIEXFN { IS_LF(PCIEXFN) } (0)->
    ereport.io.pci.mdpe@PCIEXFN;

prop error.io.pciex.poisreq-u@PCIEXFN { IS_SD(PCIEXFN) } (2)->
    ereport.io.pci.sec-dpe@PCIEXFN,
    ereport.io.pciex.tl.ptlp@PCIEXFN;

prop error.io.pciex.poisreq-u@PCIEXFN { IS_SD(PCIEXFN) } (0)->
    ereport.io.pci.mdpe@PCIEXFN,
    error.io.pciex.nonfatal@PCIEXFN;

prop error.io.pciex.poisreq-u@PCIEXFN { IS_SU(PCIEXFN) } (1)->
    ereport.io.pci.mdpe@PCIEXFN;

prop error.io.pciex.poisreq-u@PCIEXFN { IS_SU(PCIEXFN) } (0)->
    ereport.io.pci.sec-dpe@PCIEXFN,
    ereport.io.pciex.tl.ptlp@PCIEXFN,
    error.io.pciex.nonfatal@PCIEXFN;

prop error.io.pciex.poisreq-u@pciexrc/PCIEXFN (1)->
    ereport.io.pci.sec-dpe@pciexrc;

/*
 * upstream poisoned completion
 *
 * - flt-poiscomp-u is on the pciex node which generated the fault. There will
 *   be a target-mdpe downstream from here.
 * - source-poiscomp-u refers to at least one leaf or bridge device
 *   whose bdf (if leaf) must match the source-id in the payload of the
 *   ereport generated from the root complex.
 * - poiscomp-u propagates up to the root complex and any switches on
 *   route will raise ptlp and sec-mdpe ereports. The root complex will also
 *   raise a sec-mdpe and ptlp.
 *
 * We can always recognize what sort of fault this is from the ptlp/sec-mdpe at
 * the root complex. Recognizing which originating devices may be implicated
 * can be done using the source-id payload in the ptlp ereport to identify the
 * originator of the completion. The ptlp/sec-mdpe ereports at the intervening
 * switches will narrow the fault down to a single suspect.
 */
prop error.io.pciex.flt-poiscomp-u@PCIEXFN { IS_LF(PCIEXFN1) &&
    is_under(PCIEXFN, PCIEXFN1) } (0)->
    ereport.io.pci.target-mdpe@PCIEXFN1;

prop error.io.pciex.flt-poiscomp-u@PCIEXFN { IS_PCI_LF(PCIFN) &&
    is_under(PCIEXFN, PCIFN) } (0)->
    ereport.io.pci.target-mdpe@PCIFN;

prop error.io.pciex.flt-poiscomp-u@PCIEXFN1 { (IS_LF(PCIEXFN) ||
    IS_BG(PCIEXFN)) && is_under(PCIEXFN1, PCIEXFN) } (0)->
    error.io.pciex.source-poiscomp-u@PCIEXFN;

prop error.io.pciex.source-poiscomp-u@PCIEXFN1 { IS_LF(PCIEXFN1) &&
    SOURCE_ID_MATCHES_BDF && is_under(pciexrc, PCIEXFN1) } (0)->
    ereport.io.pciex.tl.ptlp@pciexrc;

prop error.io.pciex.source-poiscomp-u@PCIEXFN1 { IS_BG(PCIEXFN1) &&
    is_under(pciexrc, PCIEXFN1) } (0)->
    ereport.io.pciex.tl.ptlp@pciexrc;

prop error.io.pciex.flt-poiscomp-u@PCIEXFN (1)->
    error.io.pciex.poiscomp-u@PCIEXFN;

/*
 * the remaining propagations are also used for poisoned completions propagating
 * up due to a fault behind a pcie-pci bridge
 */
prop error.io.pciex.poiscomp-u@PCIEXFN/PCIEXFN (1)->
    error.io.pciex.poiscomp-u@PCIEXFN;

prop error.io.pciex.poiscomp-u@PCIEXFN { IS_SD(PCIEXFN) } (2)->
    ereport.io.pci.sec-dpe@PCIEXFN,
    ereport.io.pciex.tl.ptlp@PCIEXFN;

prop error.io.pciex.poiscomp-u@PCIEXFN { IS_SD(PCIEXFN) } (1)->
    ereport.io.pci.sec-mdpe@PCIEXFN,
    ereport.io.pci.mdpe@PCIEXFN;

prop error.io.pciex.poiscomp-u@PCIEXFN { IS_SD(PCIEXFN) } (0)->
    error.io.pciex.nonfatal@PCIEXFN;

prop error.io.pciex.poiscomp-u@PCIEXFN { IS_SU(PCIEXFN) } (0)->
    ereport.io.pci.mdpe@PCIEXFN,
    ereport.io.pci.sec-mdpe@PCIEXFN,
    ereport.io.pci.sec-dpe@PCIEXFN,
    ereport.io.pciex.tl.ptlp@PCIEXFN,
    error.io.pciex.nonfatal@PCIEXFN;

prop error.io.pciex.poiscomp-u@pciexrc/PCIEXFN (1)->
    ereport.io.pci.sec-dpe@pciexrc;

prop error.io.pciex.poiscomp-u@pciexrc/PCIEXFN (0)->
    ereport.io.pci.sec-mdpe@pciexrc;

/*
 * upstream request with ecrc error.
 *
 * - flt-ecrcreq-u is on the pciex node which generated the fault.
 * - source-ecrcreq-u cascades down to at least one leaf device (pciex or pci),
 *   whose bdf (if pciex) must match the source-id in the payload of the
 *   ereport generated from the root complex.
 * - ecrcreq-u propagates up to the root complex which must report it with an
 *   ecrc ereport and any switches on route can optionally raise an ecrc ereport
 *
 * Additionally, as the root complex will just throw away the packet, we may
 * eventually get a cto - so use an nr-d at the pciex leaf or bridge to get
 * the appropriate behaviour.
 *
 * We can always recognize what sort of fault this is from the ecrc (with no
 * cto) at the root complex. Recognizing which leaf device may be implicated
 * can be done from the cto ereport (for a hardened leaf driver) or for a
 * non-hardened leaf using the source-id payload of the ecrc.
 */
prop error.io.pciex.flt-ecrcreq-u@PCIEXFN1 { (IS_LF(PCIEXFN) ||
    IS_BG(PCIEXFN)) && is_under(PCIEXFN1, PCIEXFN) } (0)->
    error.io.pciex.source-ecrcreq-u@PCIEXFN;

prop error.io.pciex.source-ecrcreq-u@PCIEXFN (0)->
    error.io.pciex.nr-d@PCIEXFN;

prop error.io.pciex.source-ecrcreq-u@PCIEXFN1 { IS_LF(PCIEXFN1) &&
    SOURCE_ID_MATCHES_BDF && is_under(pciexrc, PCIEXFN1) } (0)->
    ereport.io.pciex.tl.ecrc@pciexrc;

prop error.io.pciex.source-ecrcreq-u@PCIEXFN { IS_BG(PCIEXFN) &&
    is_under(pciexrc, PCIEXFN) } (0)->
    ereport.io.pciex.tl.ecrc@pciexrc;

prop error.io.pciex.flt-ecrcreq-u@PCIEXFN (1)->
     error.io.pciex.ecrcreq-u@PCIEXFN;

prop error.io.pciex.ecrcreq-u@PCIEXFN/PCIEXFN (1)->
     error.io.pciex.ecrcreq-u@PCIEXFN;

prop error.io.pciex.ecrcreq-u@PCIEXFN { IS_SD(PCIEXFN)||IS_SU(PCIEXFN) } (0)->
    ereport.io.pciex.tl.ecrc@PCIEXFN,
    error.io.pciex.nonfatal@PCIEXFN;

/*
 * upstream completion with ecrc error.
 *
 * - flt-ecrccomp-u is on the pciex node which generated the fault.
 * - source-ecrccomp-u cascades down to at least one leaf device (pciex or pci),
 *   whose bdf (if pciex) must match the source-id in the payload of the
 *   ereport generated from the root complex.
 * - ecrccomp-u propagates up to the root complex, which should report it with
 *   an ecrc ereport and any switches on route can optionally raise an ecrc
 *   ereport.
 *
 * Additionally, as the root complex will just throw away the packet, we'll
 * eventually get a cto - so use an flt-nr-u at the pciex leaf or bridge to get
 * the appropriate behaviour.
 *
 * We can always recognize what sort of fault this from the ecrc/cto from the
 * root complex. Recognizing which leaf device may be implicated can be done
 * using either the source-id payload of the ecrc or the target-ma ereport if
 * available.
 */
prop error.io.pciex.flt-ecrccomp-u@PCIEXFN1 { (IS_LF(PCIEXFN) ||
    IS_BG(PCIEXFN)) && is_under(PCIEXFN1, PCIEXFN) } (0)->
    error.io.pciex.source-ecrccomp-u@PCIEXFN;

prop error.io.pciex.source-ecrccomp-u@PCIEXFN (0)->
    error.io.pciex.flt-nr-u@PCIEXFN;

prop error.io.pciex.source-ecrccomp-u@PCIEXFN1 { IS_LF(PCIEXFN1) &&
    SOURCE_ID_MATCHES_BDF && is_under(pciexrc, PCIEXFN1) } (0)->
    ereport.io.pciex.tl.ecrc@pciexrc;

prop error.io.pciex.source-ecrccomp-u@PCIEXFN { IS_BG(PCIEXFN) &&
    is_under(pciexrc, PCIEXFN) } (0)->
    ereport.io.pciex.tl.ecrc@pciexrc;

prop error.io.pciex.flt-ecrccomp-u@PCIEXFN (1)->
    error.io.pciex.ecrccomp-u@PCIEXFN;

prop error.io.pciex.ecrccomp-u@PCIEXFN/PCIEXFN (1)->
    error.io.pciex.ecrccomp-u@PCIEXFN;

prop error.io.pciex.ecrccomp-u@PCIEXFN { IS_SD(PCIEXFN)||IS_SU(PCIEXFN) } (0)->
    ereport.io.pciex.tl.ecrc@PCIEXFN,
    error.io.pciex.nonfatal@PCIEXFN;

/*
 * no response to downstream requester
 *
 * - nr-d will effectively cascade downstream to the requester. The fault here
 *   is always at the root complex. For a hardened leaf device driver, we will
 *   always be able to recognize this as the requester will report this as a
 *   cto. For non-hardened leaf devices, no cto will be reported, and though we
 *   should still see a nonfatal error reported from the root complex
 *   identifying the leaf device, we won't actually be informed that the error
 *   was a cto.
 */
prop error.io.pciex.nr-d@PCIEXFN (1)->
    error.io.pciex.nr-fwd-d@PCIEXFN { IS_BG(PCIEXFN) || IS_LF(PCIEXFN) },
    error.io.pciex.nr-fwd-d@PCIEXFNHZ { (IS_BG(PCIEXFNHZ) ||
    IS_LF(PCIEXFNHZ)) && is_under(PCIEXFN, PCIEXFNHZ) }; 

prop error.io.pciex.nr-fwd-d@PCIEXFN { IS_BG(PCIEXFN) } (2)->
    error.io.pciex.nonfatal@PCIEXFN,
    ereport.io.pciex.tl.cto@PCIEXFN;

prop error.io.pciex.nr-fwd-d@PCIEXFN { IS_BG(PCIEXFN) } (0)->
    ereport.io.pci.ma@PCIEXFN,
    ereport.io.pci.sec-sta@PCIEXFN,
    error.io.pci.nr-drw-d@PCIEXFN/PCIFN,
    error.io.pci.ta-drw-d@PCIEXFN/PCIFN;

prop error.io.pciex.nr-fwd-d@PCIEXFN { IS_LF(PCIEXFN) } (1)->
    error.io.pciex.nonfatal@PCIEXFN;

prop error.io.pciex.nr-fwd-d@PCIEXFN { IS_LF(PCIEXFN) } (0)->
    ereport.io.pci.ma@PCIEXFN,
    ereport.io.pciex.tl.cto@PCIEXFN;

/*
 * no response to upstream requester
 *
 * - flt-nr-u will effectively cascade upstream to the root complex which will
 *   report it as a cto.
 *
 * We have to use target-ma to informs us which device failed to respond.
 */
prop error.io.pciex.flt-nr-u@PCIEXFN (1)->
    error.io.pci.target-ma-d@PCIEXFN;

prop error.io.pciex.flt-nr-u@PCIEXFN (1)->
    error.io.pciex.nr-u@PCIEXFN;

prop error.io.pciex.nr-u@PCIEXFN/PCIEXFN (1)->
    error.io.pciex.nr-u@PCIEXFN;

prop error.io.pciex.nr-u@pciexrc/PCIEXFN (1)->
    ereport.io.pciex.tl.cto@pciexrc;

prop error.io.pciex.nr-u@pciexrc/PCIEXFN (0)->
    ereport.io.pci.sec-ma@pciexrc;

/*
 * downstream malformed tlp
 *
 * This will cascade downstream to the receiver which will report it as an mtlp.
 * For non-hardened leaf drivers, no mtlp will be reported, and though we should
 * still see a fatal error reported from the root complex identifying the leaf
 * device, we won't actually be informed that the error was a mtlp.
 * Note that sw-mtlp-d is to handle the case where the switch is actually
 * the target of the packet (config request etc).
 */
prop error.io.pciex.mtlp-d@PCIEXFN (1)->
    error.io.pciex.mtlp-fwd-d@PCIEXFN { !IS_SD(PCIEXFN) },
    error.io.pciex.mtlp-fwd-d@PCIEXFNHZ { !IS_SD(PCIEXFNHZ) &&
    is_under(PCIEXFN, PCIEXFNHZ) };

prop error.io.pciex.mtlp-fwd-d@PCIEXFN { IS_SU(PCIEXFN) } (2)->
    error.io.pciex.fatal@PCIEXFN,
    ereport.io.pciex.tl.mtlp@PCIEXFN;

prop error.io.pciex.mtlp-fwd-d@PCIEXFN { IS_BG(PCIEXFN) } (2)->
    error.io.pciex.fatal@PCIEXFN,
    ereport.io.pciex.tl.mtlp@PCIEXFN;

prop error.io.pciex.mtlp-fwd-d@PCIEXFN { IS_LF(PCIEXFN) } (1)->
    error.io.pciex.fatal@PCIEXFN;

prop error.io.pciex.mtlp-fwd-d@PCIEXFN { IS_LF(PCIEXFN) } (0)->
    ereport.io.pciex.tl.mtlp@PCIEXFN;

/*
 * upstream malformed tlp
 *
 * This will cascade upstream to the receiver which will report it as an mtlp.
 */
prop error.io.pciex.flt-mtlp-u@PCIEXFN (1)->
    error.io.pciex.mtlp-u@PCIEXFN;

prop error.io.pciex.mtlp-u@PCIEXFN/PCIEXFN (1)->
    error.io.pciex.mtlp-u@PCIEXFN;

prop error.io.pciex.mtlp-u@pciexrc/PCIEXFN (1)->
    ereport.io.pciex.tl.mtlp@pciexrc;

/*
 * downstream completer aborts
 *
 * This could be the fault of the root complex or a switch reporting an internal
 * error, or of the leaf device sending an invalid request (the latter is
 * handled by the flt-badreq-u case below).
 *
 * This is reported by the completer or by an intervening downstream switch
 * port. The completer abort response propagates down to the initiator which
 * will set the legacy pci bit rta.
 *
 * The fault can always be recognized by the ca ereport from the root complex
 * or downstream switch port. The originator of the request can be recognized
 * by the rta for a hardened driver or by using the source-id payload of the
 * ca ereport for a non-hardened driver.
 */
prop error.io.pciex.ca-d@pciexrc/PCIEXFN (0)->
    ereport.io.pciex.tl.ca@pciexrc;

prop error.io.pciex.ca-d@pciexrc/PCIEXFN (1)->
    ereport.io.pci.sec-sta@pciexrc;

prop error.io.pciex.ca-d@PCIEXFN/PCIEXFN (0)->
    ereport.io.pci.sec-sta@PCIEXFN;

prop error.io.pciex.ca-d@PCIEXFN/PCIEXFN (2)->
    ereport.io.pciex.tl.ca@PCIEXFN,
    error.io.pciex.nonfatal@PCIEXFN;

prop error.io.pciex.ca-d@PCIEXFN (1)->
    error.io.pciex.ca-fwd-d@PCIEXFN { IS_BG(PCIEXFN) || IS_LF(PCIEXFN) },
    error.io.pciex.ca-fwd-d@PCIEXFNHZ { (IS_BG(PCIEXFNHZ) ||
    IS_LF(PCIEXFNHZ)) && is_under(PCIEXFN, PCIEXFNHZ) };

prop error.io.pciex.ca-fwd-d@PCIEXFN { IS_BG(PCIEXFN) } (1)->
    ereport.io.pci.rta@PCIEXFN;

prop error.io.pciex.ca-fwd-d@PCIEXFN { IS_BG(PCIEXFN) } (0)->
    ereport.io.pci.sec-sta@PCIEXFN,
    error.io.pci.ta-drw-d@PCIEXFN/PCIFN;

prop error.io.pciex.ca-fwd-d@PCIEXFN { IS_LF(PCIEXFN) } (0)->
    ereport.io.pci.rta@PCIEXFN;

/*
 * upstream completer aborts
 *
 * This could be the fault of the leaf device/bridge/upstream switch port
 * reporting an internal error, or of the root complex sending an invalid
 * request (the latter case is handled by badreq-d below).
 *
 * This is reported as a ca by the completer. The completer (for non-posted
 * requests) sends the appropriate error bits in the completion message to
 * the initiator which will set the legacy pci bit sec-rta.
 *
 * The fault can always be recognized from the sec-rta bit at the root complex.
 *
 * If the fault was with a PCI Express leaf with a hardened driver, then we
 * will identify the device from the ca ereport.
 *
 * If the fault was with a PCI Express leaf with a non-hardened driver, then we
 * can still identify the leaf device from the source-id payload of the nonfatal
 * message ereport from the root complex or from the target-rta ereport.
 */
prop error.io.pciex.flt-ca-u@PCIEXFN { !IS_LF(PCIEXFN) } (1)->
    ereport.io.pciex.tl.ca@PCIEXFN;

prop error.io.pciex.flt-ca-u@PCIEXFN { IS_LF(PCIEXFN) } (0)->
    ereport.io.pciex.tl.ca@PCIEXFN;

prop error.io.pciex.flt-ca-u@PCIEXFN (0)->
    error.io.pciex.nonfatal@PCIEXFN,
    ereport.io.pci.sta@PCIEXFN;

prop error.io.pciex.flt-ca-u@PCIEXFN (2)->
    error.io.pci.target-rta-d@PCIEXFN,
    error.io.pciex.ca-u@PCIEXFN;

prop error.io.pciex.ca-u@PCIEXFN/PCIEXFN (1)->
    error.io.pciex.ca-u@PCIEXFN;

prop error.io.pciex.ca-u@pciexrc/PCIEXFN (0)->
    ereport.io.pci.sec-rta@pciexrc;

/*
 * upstream bad request
 *
 * When detecting bad data on a request the completer (or any switch on the
 * way to the completer) may report ur or ca. If the switch detects the problem
 * first then the request doesn't get forwarded on to the completer.
 *
 * These are reported as ur/ca ereports. For non-posted requests, the reporter
 * then sends the appropriate error bits in the completion message to the
 * initiator which will set the legacy pci bits ma or rta.
 *
 * For flt-badreq-u, the ca/ur ereports contain a source-id payload that
 * identifies the initiator.
 *
 * The fault can always be recognized by the ca/ur ereport from the root
 * complex or downstream switch port. The originator of the request can be
 * recognized by the rta/ma for a hardened driver or by using the source-id
 * payload of the ca/ur ereport for a non-hardened driver.
 */
prop error.io.pciex.flt-badreq-u@PCIEXFN (0)->
    ereport.io.pci.ma@PCIEXFN,
    ereport.io.pci.rta@PCIEXFN;

prop error.io.pciex.flt-badreq-u@PCIEXFN1 {
    SOURCE_ID_MATCHES_BDF && is_under(pciexrc, PCIEXFN1) } (0)->
    ereport.io.pciex.tl.ur@pciexrc,
    ereport.io.pciex.tl.ca@pciexrc;

prop error.io.pciex.flt-badreq-u@PCIEXFN (1)->
    error.io.pciex.badreq-u@PCIEXFN;

prop error.io.pciex.badreq-u@PCIEXFN/PCIEXFN (1)->
    error.io.pciex.badreq-u@PCIEXFN;

prop error.io.pciex.badreq-u@pciexrc/PCIEXFN (0)->
    ereport.io.pci.sec-sta@pciexrc;

prop error.io.pciex.flt-badreq-u@PCIEXFN1 { IS_SD(PCIEXFN) &&
    SOURCE_ID_MATCHES_BDF && is_under(PCIEXFN, PCIEXFN1) } (0)->
    ereport.io.pciex.tl.ur@PCIEXFN,
    ereport.io.pciex.tl.ca@PCIEXFN;

prop error.io.pciex.flt-badreq-u@PCIEXFN1 { IS_SD(PCIEXFN) &&
    is_under(PCIEXFN, PCIEXFN1) } (0)->
    ereport.io.pci.sec-sta@PCIEXFN,
    error.io.pciex.nonfatal@PCIEXFN;

/*
 * downstream bad request
 *
 * When detecting bad data on a request the completer (or any switch on the
 * way to the completer) may report ur or ca. If the switch detects the problem
 * first then the request doesn't get forwarded on to the completer.
 *
 * These are reported as ur/ca ereports (except where the completer is a non-
 * hardened leaf driver when all we get is a nonfatal error from the root
 * complex identifying the leaf device). The reporter then sends the appropriate
 * error bits in the completion message to the initiator which will set the
 * legacy pci bits ma or rta (oddly there is no equivalent in pcie error
 * reporting).
 */
prop error.io.pciex.badreq-d@PCIEXFN (1)->
    error.io.pciex.flt-ur-u@PCIEXFN,
    error.io.pciex.flt-ca-u@PCIEXFN,
    error.io.pciex.flt-ur-u@PCIEXFNHZ { is_under(PCIEXFN, PCIEXFNHZ) },
    error.io.pciex.flt-ca-u@PCIEXFNHZ { is_under(PCIEXFN, PCIEXFNHZ) },
    error.io.pci.badreq-pw-d@PCIEXFNHZ/PCIFNHZ { is_under(PCIEXFN, PCIEXFNHZ) },
    error.io.pci.badreq-drw-d@PCIEXFNHZ/PCIFNHZ { is_under(PCIEXFN,PCIEXFNHZ) };

prop error.io.pciex.flt-ur-u@PCIEXFN { !IS_LF(PCIEXFN) } (1)->
    ereport.io.pciex.tl.ur@PCIEXFN;

prop error.io.pciex.flt-ur-u@PCIEXFN { IS_LF(PCIEXFN) } (0)->
    ereport.io.pciex.tl.ur@PCIEXFN;

prop error.io.pciex.flt-ur-u@PCIEXFN (2)->
    error.io.pci.target-ma-d@PCIEXFN,
    error.io.pciex.ur-u@PCIEXFN;

prop error.io.pciex.flt-ur-u@PCIEXFN (0)->
    error.io.pciex.nonfatal@PCIEXFN;

prop error.io.pciex.ur-u@PCIEXFN/PCIEXFN (1)->
    error.io.pciex.ur-u@PCIEXFN;

prop error.io.pciex.ur-u@pciexrc/PCIEXFN (0)->
    ereport.io.pci.sec-ma@pciexrc;

/*
 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * Stub unused legacy pci ereports at root complex.
 * Stub tl.uc as we can't do anything useful with it (we should eventually
 * get a cto which we can do something with - a uc without a cto is a genuinely
 * spurious completion which is at least harmless).
 * Stub messages that the root complex sends to itself.
 * Stub mce/mue/ce/nr/noadverr.
 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 */

event error.io.pciex.discard_rc@pciexrc;

event ereport.io.pciex.noadverr@PCIEXFN{within(5s)};
event ereport.io.pciex.correctable@PCIEXFN{within(5s)};
event ereport.io.pciex.nonfatal@PCIEXFN{within(5s)};
event ereport.io.pciex.a-nonfatal@PCIEXFN{within(5s)};
event ereport.io.pciex.fatal@PCIEXFN{within(5s)};
event ereport.io.pci.nr@PCIEXFN{within(5s)};
event ereport.io.pci.nr@pciexrc{within(5s)};
event ereport.io.pci.ma@pciexrc{within(5s)};
event ereport.io.pci.rta@pciexrc{within(5s)};
event ereport.io.pci.sta@pciexrc{within(5s)};
event ereport.io.pci.dpe@pciexrc{within(5s)};
event ereport.io.pci.mdpe@pciexrc{within(5s)};
event ereport.io.pci.sserr@pciexrc{within(5s)};
event ereport.io.pciex.tl.uc@pciexrc{within(5s)};
event ereport.io.pciex.noadverr@pciexrc{within(5s)};
event ereport.io.pciex.a-nonfatal@pciexrc{within(5s)};
event ereport.io.pciex.rc.ce-msg@pciexrc{within(5s)};
event ereport.io.pciex.rc.mce-msg@pciexrc{within(5s)};

event upset.io.pciex.discard_uc@PCIEXFN;
event upset.io.pciex.discard@PCIEXFN;
event upset.io.pciex.discard@pciexrc;

prop upset.io.pciex.discard_uc@PCIEXFN { IS_BG(PCIEXFN) } (1)->
    ereport.io.pciex.tl.uc@PCIEXFN;

prop upset.io.pciex.discard_uc@PCIEXFN { IS_LF(PCIEXFN) } (1)->
    ereport.io.pciex.tl.uc@PCIEXFN;

prop upset.io.pciex.discard@PCIEXFN (1)->
    ereport.io.pci.nr@PCIEXFN,
    ereport.io.pciex.noadverr@PCIEXFN,
    ereport.io.pciex.correctable@PCIEXFN,
    ereport.io.pciex.nonfatal@PCIEXFN,
    ereport.io.pciex.a-nonfatal@PCIEXFN,
    ereport.io.pciex.fatal@PCIEXFN;

prop error.io.pciex.discard_rc@pciexrc (0)->
    ereport.io.pciex.rc.mue-msg@pciexrc,
    ereport.io.pciex.rc.fe-msg@pciexrc { SOURCE_ID_MATCHES_OWN_BDF },
    ereport.io.pciex.rc.nfe-msg@pciexrc { SOURCE_ID_MATCHES_OWN_BDF };

prop upset.io.pciex.discard@pciexrc (1)->
    error.io.pciex.discard_rc@pciexrc,
    ereport.io.pci.nr@pciexrc,
    ereport.io.pciex.noadverr@pciexrc,
    ereport.io.pciex.a-nonfatal@pciexrc,
    ereport.io.pciex.rc.ce-msg@pciexrc,
    ereport.io.pciex.rc.mce-msg@pciexrc,
    ereport.io.pciex.tl.uc@pciexrc,
    ereport.io.pci.ma@pciexrc,
    ereport.io.pci.rta@pciexrc,
    ereport.io.pci.sta@pciexrc,
    ereport.io.pci.dpe@pciexrc,
    ereport.io.pci.mdpe@pciexrc,
    ereport.io.pci.sserr@pciexrc;

/*
 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * rules for propagations from child PCI bus
 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 */

event error.io.pci.retry-to-u@PCIEXFN/PCIFN;
event error.io.pci.ma-u@PCIEXFN/PCIFN;
event error.io.pci.ta-u@PCIEXFN/PCIFN;
event error.io.pci.ape-u@PCIEXFN/PCIFN;
event error.io.pci.source-ape-u@PCIFN;
event error.io.pci.target-ma-d@PCIFN;
event error.io.pci.target-rta-d@PCIFN;
event error.io.pci.badreq-pw-u@PCIEXFN/PCIFN;
event error.io.pci.badreq-drw-u@PCIEXFN/PCIFN;
event error.io.pci.source-perr-u@PCIFN;
event error.io.pci.source-dpdata-u@PCIFN;
event error.io.pci.dpdata-pw-u@PCIEXFN/PCIFN;
event error.io.pci.dpdata-dw-u@PCIEXFN/PCIFN;
event error.io.pci.dpdata-dr-u@PCIEXFN/PCIFN;
event error.io.pci.perr-pw-u@PCIEXFN/PCIFN;
event error.io.pci.perr-dw-u@PCIEXFN/PCIFN;
event error.io.pci.perr-dr-u@PCIEXFN/PCIFN;
event error.io.pci.serr-u@PCIEXFN/PCIFN;
event error.io.pcix.scpe-u@PCIEXFN/PCIFN;
event error.io.pcix.source-scpe-u@PCIFN;
event error.io.pcix.spl-comp-ma-u@PCIEXFN/PCIFN;
event error.io.pcix.spl-comp-ta-u@PCIEXFN/PCIFN;
event error.io.pcix.spl-comp-ma-d@PCIEXFN/PCIFN;
event error.io.pcix.spl-comp-ta-d@PCIEXFN/PCIFN;
event error.io.pcix.uscmd@PCIEXFN;

event ereport.io.pcix.sec-spl-dis@PCIEXFN{within(5s)};
event ereport.io.pciex.bdg.uscmd@PCIEXFN{within(5s)};
event ereport.io.pciex.bdg.sec-perr@PCIEXFN{within(5s)};
event ereport.io.pciex.bdg.sec-uadr@PCIEXFN{within(5s)};
event ereport.io.pciex.bdg.sec-uat@PCIEXFN{within(5s)};
event ereport.io.pciex.bdg.sec-serr@PCIEXFN{within(5s)};
event ereport.io.pciex.bdg.sec-tex@PCIEXFN{within(5s)};
event ereport.io.pciex.bdg.sec-rma@PCIEXFN{within(5s)};
event ereport.io.pciex.bdg.sec-rta@PCIEXFN{within(5s)};
event ereport.io.pciex.bdg.sec-ma-sc@PCIEXFN{within(5s)};
event ereport.io.pciex.bdg.sec-ta-sc@PCIEXFN{within(5s)};
event ereport.io.pci.dto@PCIEXFN{within(5s)};
event ereport.io.pci.sec-rta@PCIEXFN{within(5s)};
event ereport.io.pci.sec-ma@PCIEXFN{within(5s)};

/*
 * ma-u will only propagate on to pciex bus for non-posted accesses. It
 * is then represented as an unsupported request.
 */
prop error.io.pci.ma-u@PCIEXFN/PCIFN (0)->
    ereport.io.pciex.tl.ur@PCIEXFN,
    error.io.pciex.ur-u@PCIEXFN;

prop error.io.pci.ma-u@PCIEXFN/PCIFN (2)->
    ereport.io.pci.sec-ma@PCIEXFN,
    error.io.pciex.nonfatal@PCIEXFN;

prop error.io.pci.target-ma-d@PCIFN1 { IS_BG(PCIEXFN) && IS_PCI_LF(PCIFN1) &&
    SOURCE_ID_MATCHES_BDF && is_under(PCIEXFN, PCIFN1) } (0)->
    ereport.io.pciex.bdg.sec-rma@PCIEXFN;

/*
 * ta-u will only propagate on to pciex bus for non-posted accesses. It is
 * then represented as a completer abort.
 */
prop error.io.pci.ta-u@PCIEXFN/PCIFN (0)->
    ereport.io.pci.sta@PCIEXFN,
    ereport.io.pciex.tl.ca@PCIEXFN,
    error.io.pciex.ca-u@PCIEXFN;

prop error.io.pci.ta-u@PCIEXFN/PCIFN (2)->
    ereport.io.pci.sec-rta@PCIEXFN,
    error.io.pciex.nonfatal@PCIEXFN;

prop error.io.pci.target-rta-d@PCIFN1 { IS_BG(PCIEXFN) && IS_PCI_LF(PCIFN1) &&
    SOURCE_ID_MATCHES_BDF && is_under(PCIEXFN, PCIFN1) } (0)->
    ereport.io.pciex.bdg.sec-rta@PCIEXFN;

/*
 * PERR# on a delayed write is represented as an unsupported request
 */
prop error.io.pci.perr-dw-u@PCIEXFN/PCIFN (1)->
    ereport.io.pci.sec-mdpe@PCIEXFN;

prop error.io.pci.perr-dw-u@PCIEXFN/PCIFN (0)->
    error.io.pciex.flt-ur-u@PCIEXFN;

prop error.io.pci.perr-pw-u@PCIEXFN/PCIFN (1)->
    ereport.io.pci.sec-mdpe@PCIEXFN;

prop error.io.pci.perr-pw-u@PCIEXFN/PCIFN (0)->
    error.io.pciex.nonfatal@PCIEXFN;

prop error.io.pci.perr-dr-u@PCIEXFN/PCIFN (1)->
    error.io.pciex.nonfatal@PCIEXFN;

prop error.io.pci.source-perr-u@PCIFN1 { IS_BG(PCIEXFN) && IS_PCI_LF(PCIFN1) &&
    SOURCE_ID_MATCHES_BDF && is_under(PCIEXFN, PCIFN1) } (0)->
    ereport.io.pciex.bdg.sec-perr@PCIEXFN;

/*
 * If the bridge receives data with bad ecc/parity from pci/pci-x, it will
 * propagate onto pci express as a poisoned tlp
 */
prop error.io.pci.dpdata-dr-u@PCIEXFN/PCIFN (2)->
    ereport.io.pci.sec-dpe@PCIEXFN,
    error.io.pciex.poiscomp-u@PCIEXFN;

prop error.io.pci.dpdata-dr-u@PCIEXFN/PCIFN (0)->
    error.io.pciex.nonfatal@PCIEXFN;

prop error.io.pci.dpdata-dr-u@PCIEXFN/PCIFN (1)->
    ereport.io.pci.sec-mdpe@PCIEXFN,
    ereport.io.pci.mdpe@PCIEXFN;

prop error.io.pci.dpdata-dw-u@PCIEXFN/PCIFN (1)->
    ereport.io.pci.sec-dpe@PCIEXFN;

prop error.io.pci.dpdata-dw-u@PCIEXFN/PCIFN (0)->
    error.io.pciex.nonfatal@PCIEXFN,
    error.io.pciex.poisreq-u@PCIEXFN,
    ereport.io.pci.ma@PCIEXFN,
    ereport.io.pci.sec-sta@PCIEXFN,
    error.io.pci.ta-drw-d@PCIEXFN/PCIFN;

prop error.io.pci.dpdata-pw-u@PCIEXFN/PCIFN (2)->
    ereport.io.pci.sec-dpe@PCIEXFN,
    error.io.pciex.poisreq-u@PCIEXFN;

prop error.io.pci.dpdata-pw-u@PCIEXFN/PCIFN (0)->
    error.io.pciex.nonfatal@PCIEXFN,
    ereport.io.pci.ma@PCIEXFN;

prop error.io.pci.source-dpdata-u@PCIFN { is_under(pciexrc, PCIFN) } (0)->
    ereport.io.pciex.tl.ptlp@pciexrc,
    ereport.io.pciex.tl.ur@pciexrc;

prop error.io.pci.source-dpdata-u@PCIFN1 { IS_BG(PCIEXFN) && IS_PCI_LF(PCIFN1)
    && SOURCE_ID_MATCHES_BDF && is_under(PCIEXFN, PCIFN1) } (0)->
    ereport.io.pciex.bdg.sec-ude@PCIEXFN;

/*
 * If the bridge sees an address or attribute parity error it is considered
 * a fatal error.
 */
prop error.io.pci.ape-u@PCIEXFN/PCIFN (2)->
    ereport.io.pci.sec-dpe@PCIEXFN,
    error.io.pciex.fatal@PCIEXFN;

prop error.io.pci.source-ape-u@PCIFN1 { IS_BG(PCIEXFN) && IS_PCI_LF(PCIFN1) &&
    SOURCE_ID_MATCHES_BDF && is_under(PCIEXFN, PCIFN1) } (0)->
    ereport.io.pciex.bdg.sec-uat@PCIEXFN,
    ereport.io.pciex.bdg.sec-uadr@PCIEXFN;

prop error.io.pci.ape-u@PCIEXFN/PCIFN (0)->
    ereport.io.pci.sec-rserr@PCIEXFN,
    ereport.io.pciex.bdg.sec-serr@PCIEXFN,
    ereport.io.pci.sec-sta@PCIEXFN;

/*
 * If the bridge sees a split completion error (pci-x only) it could
 * result in a number of things
 * - unrecovered split completion message data error (uscmd). This would
 *   happen on a pio write. A completer abort is returned to the initiator.
 * - for various faults in the split completion (eg address parity error)
 *   we will respond with a target abort (which the child device will treat
 *   as a split completion ta)
 * - for other faults we can't tell who send the split completion and so
 *   just drop the request (which the child device sees as a split
 *   completion ma)
 */
prop error.io.pcix.scpe-u@PCIEXFN/PCIFN (0)->
    ereport.io.pci.sec-dpe@PCIEXFN,
    ereport.io.pci.sec-rserr@PCIEXFN,
    ereport.io.pciex.bdg.sec-serr@PCIEXFN,
    ereport.io.pci.sec-sta@PCIEXFN,
    error.io.pciex.fatal@PCIEXFN;

prop error.io.pcix.source-scpe-u@PCIFN1 { IS_BG(PCIEXFN) && IS_PCI_LF(PCIFN1) &&
    SOURCE_ID_MATCHES_BDF && is_under(PCIEXFN, PCIFN1) } (0)->
    ereport.io.pciex.bdg.sec-uat@PCIEXFN,
    ereport.io.pciex.bdg.sec-uadr@PCIEXFN;

prop error.io.pcix.scpe-u@PCIEXFN/PCIFN (1)->
    error.io.pcix.uscmd@PCIEXFN,
    error.io.pcix.spl-comp-ma-d@PCIEXFN/PCIFN,
    error.io.pcix.spl-comp-ta-d@PCIEXFN/PCIFN;

prop error.io.pcix.uscmd@PCIEXFN (4)->
    error.io.pciex.fatal@PCIEXFN,
    ereport.io.pci.sta@PCIEXFN,
    ereport.io.pciex.tl.ca@PCIEXFN,
    ereport.io.pciex.bdg.uscmd@PCIEXFN;

prop error.io.pcix.uscmd@PCIEXFN (0)->
    error.io.pciex.ca-u@PCIEXFN;

/*
 * Similarly a child device may have responded with a master abort or
 * target abort to one of our split competions. The hardware just logs these.
 */
prop error.io.pcix.spl-comp-ma-u@PCIEXFN/PCIFN (3)->
    error.io.pciex.nonfatal@PCIEXFN,
    ereport.io.pcix.sec-spl-dis@PCIEXFN,
    ereport.io.pciex.bdg.sec-ma-sc@PCIEXFN;

prop error.io.pcix.spl-comp-ma-u@PCIEXFN/PCIFN (0)->
    ereport.io.pci.sec-ma@PCIEXFN;

prop error.io.pcix.spl-comp-ta-u@PCIEXFN/PCIFN (4)->
    error.io.pciex.nonfatal@PCIEXFN,
    ereport.io.pcix.sec-spl-dis@PCIEXFN,
    ereport.io.pciex.bdg.sec-ta-sc@PCIEXFN,
    ereport.io.pci.sec-rta@PCIEXFN;

/*
 * SERR# is considered fatal
 */
prop error.io.pci.serr-u@PCIEXFN/PCIFN (3)->
    error.io.pciex.fatal@PCIEXFN,
    ereport.io.pci.sec-rserr@PCIEXFN,
    ereport.io.pciex.bdg.sec-serr@PCIEXFN;

/*
 * Retry time-out is nonfatal. The initial requester has stopped retrying so
 * there's nothing else the hardware can do but flag the error.
 */
prop error.io.pci.retry-to-u@PCIEXFN/PCIFN (2)->
    error.io.pciex.nonfatal@PCIEXFN,
    ereport.io.pciex.bdg.sec-tex@PCIEXFN;

prop error.io.pci.retry-to-u@PCIEXFN/PCIFN (0)->
    ereport.io.pci.sta@PCIEXFN,
    ereport.io.pci.dto@PCIEXFN,
    error.io.pciex.ca-u@PCIEXFN;

/*
 * A bad dma request (eg with invalid address) propagates onto pci express
 * as a bad dma request. The end result may be a master abort or target abort
 * (depending on whether the child is pci-x or pci).
 */
prop error.io.pci.badreq-pw-u@PCIEXFN/PCIFN (0)->
    ereport.io.pci.ma@PCIEXFN,
    ereport.io.pci.rta@PCIEXFN,
    error.io.pciex.badreq-u@PCIEXFN,
    ereport.io.pci.sec-sta@PCIEXFN;

prop error.io.pci.badreq-pw-u@PCIEXFN/PCIFN {
    is_under(pciexrc, PCIEXFN/PCIFN) } (0)->
    ereport.io.pciex.tl.ur@pciexrc,
    ereport.io.pciex.tl.ca@pciexrc;

prop error.io.pci.badreq-pw-u@PCIEXFN/PCIFN { IS_SD(PCIEXFN1) &&
    is_under(PCIEXFN1, PCIEXFN/PCIFN) } (0)->
    ereport.io.pciex.tl.ur@PCIEXFN1,
    ereport.io.pciex.tl.ca@PCIEXFN1,
    ereport.io.pci.sec-sta@PCIEXFN1,
    error.io.pciex.nonfatal@PCIEXFN1;

prop error.io.pci.badreq-drw-u@PCIEXFN/PCIFN (0)->
    ereport.io.pci.ma@PCIEXFN,
    ereport.io.pci.rta@PCIEXFN,
    error.io.pciex.badreq-u@PCIEXFN,
    ereport.io.pci.sec-sta@PCIEXFN;

prop error.io.pci.badreq-drw-u@PCIEXFN/PCIFN {
    is_under(pciexrc, PCIEXFN/PCIFN) } (0)->
    ereport.io.pciex.tl.ur@pciexrc,
    ereport.io.pciex.tl.ca@pciexrc;

prop error.io.pci.badreq-drw-u@PCIEXFN/PCIFN { IS_SD(PCIEXFN1) &&
    is_under(PCIEXFN1, PCIEXFN/PCIFN) } (0)->
    ereport.io.pciex.tl.ur@PCIEXFN1,
    ereport.io.pciex.tl.ca@PCIEXFN1,
    ereport.io.pci.sec-sta@PCIEXFN1,
    error.io.pciex.nonfatal@PCIEXFN1;

/*
 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * target- propagations
 * 
 * A Root Complex driver may generate "target-" ereports when knowledge of the
 * physical address associated with a fault allows the target device to be
 * determined. This is not a requirement of the Diagnosis Engine, but can be
 * valuable when available.
 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 */
event error.io.pci.target-ma-d@PCIEXFN/PCIFN;
event error.io.pci.target-rta-d@PCIEXFN/PCIFN;
event ereport.io.pci.target-rta@PCIEXFN{within(5s)};
event ereport.io.pci.target-ma@PCIEXFN{within(5s)};

prop error.io.pci.target-ma-d@PCIEXFN (0)->
    ereport.io.pci.target-ma@PCIEXFN,
    ereport.io.pci.target-ma@PCIEXFNHZ { is_under(PCIEXFN, PCIEXFNHZ) },
    error.io.pci.target-ma-d@PCIEXFNHZ/PCIFNHZ { is_under(PCIEXFN, PCIEXFNHZ) };

prop error.io.pci.target-rta-d@PCIEXFN (0)->
    ereport.io.pci.target-rta@PCIEXFN,
    ereport.io.pci.target-rta@PCIEXFNHZ { is_under(PCIEXFN, PCIEXFNHZ) },
    error.io.pci.target-rta-d@PCIEXFNHZ/PCIFNHZ { is_under(PCIEXFN,PCIEXFNHZ) };

/*
 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * stub unused pciex-pci bridge ereports
 * - ignore usc/sec-unex-spl
 * - ignore sec-spl-or/sec-spl-dly as these aren't really faults (tuning info)
 * - ignore ecc.ue ereports (we get everything we need from dpe/mdpe)
 * - ignore ecc.ce ereports for now (could do serd on these)
 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 */

event ereport.io.pciex.bdg.usc@PCIEXFN{within(5s)};
event ereport.io.pcix.sec-unex-spl@PCIEXFN{within(5s)};
event ereport.io.pcix.sec-spl-or@PCIEXFN{within(5s)};
event ereport.io.pcix.sec-spl-dly@PCIEXFN{within(5s)};
event ereport.io.pcix.sec-ecc.ce-addr@PCIEXFN{within(5s)};
event ereport.io.pcix.sec-ecc.ce-attr@PCIEXFN{within(5s)};
event ereport.io.pcix.sec-ecc.ce-data@PCIEXFN{within(5s)};
event ereport.io.pcix.sec-ecc.ue-addr@PCIEXFN{within(5s)};
event ereport.io.pcix.sec-ecc.ue-attr@PCIEXFN{within(5s)};
event ereport.io.pcix.sec-ecc.ue-data@PCIEXFN{within(5s)};
event ereport.io.pcix.sec-s-ce@PCIEXFN{within(5s)};
event ereport.io.pcix.sec-s-ue@PCIEXFN{within(5s)};

event upset.io.pciex.discard-bdg@PCIEXFN;

prop upset.io.pciex.discard-bdg@PCIEXFN (1)->
    ereport.io.pciex.bdg.usc@PCIEXFN,
    ereport.io.pcix.sec-unex-spl@PCIEXFN,
    ereport.io.pcix.sec-spl-or@PCIEXFN,
    ereport.io.pcix.sec-spl-dly@PCIEXFN,
    ereport.io.pcix.sec-ecc.ce-addr@PCIEXFN,
    ereport.io.pcix.sec-ecc.ce-attr@PCIEXFN,
    ereport.io.pcix.sec-ecc.ce-data@PCIEXFN,
    ereport.io.pcix.sec-ecc.ue-addr@PCIEXFN,
    ereport.io.pcix.sec-ecc.ue-attr@PCIEXFN,
    ereport.io.pcix.sec-ecc.ue-data@PCIEXFN,
    ereport.io.pcix.sec-s-ce@PCIEXFN,
    ereport.io.pcix.sec-s-ue@PCIEXFN;