Home | History | Annotate | Download | only in sun4v
      1 /*
      2  * CDDL HEADER START
      3  *
      4  * The contents of this file are subject to the terms of the
      5  * Common Development and Distribution License (the "License").
      6  * You may not use this file except in compliance with the License.
      7  *
      8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9  * or http://www.opensolaris.org/os/licensing.
     10  * See the License for the specific language governing permissions
     11  * and limitations under the License.
     12  *
     13  * When distributing Covered Code, include this CDDL HEADER in each
     14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15  * If applicable, add the following below this CDDL HEADER, with the
     16  * fields enclosed by brackets "[]" replaced with your own identifying
     17  * information: Portions Copyright [yyyy] [name of copyright owner]
     18  *
     19  * CDDL HEADER END
     20  */
     21 /*
     22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
     23  * Use is subject to license terms.
     24  */
     25 
     26 #pragma dictionary "SUN4V"
     27 
     28 /*
     29  * Eversholt rules for the N2 PIU extention to Fire nexus driver
     30  */
     31 #define HB_FIT			400
     32 #define NONFATAL_COUNT		10
     33 #define NONFATAL_TIME		1hour
     34 #define PCIEX_DEV_FIT		1000
     35 #define LINK_EVENTS_COUNT	10
     36 #define LINK_EVENTS_TIME	1h
     37 
     38 /*
     39  * Test for primary or secondary ereports
     40  */
     41 #define IS_PRIMARY (payloadprop("primary"))
     42 #define IS_SECONDARY (! payloadprop("primary"))
     43 
     44 /*
     45  * payload: mmu-tfsr
     46  *
     47  * Extract the request id, the BDF value, in the MMU TFSR register
     48  *
     49  * PRM 2.0, pg 243
     50  *    Request ID: bits 15:0
     51  *
     52  * Example:
     53  *   0x7766554433221100
     54  *                 ^^^^
     55  */
     56 #define MMU_REQ_ID_BIT_MODULO (1 << 16)
     57 #define MMU_MATCH_BDF(mmu_tfsr, b, d, f) \
     58 	( IS_PRIMARY && \
     59 	  (((mmu_tfsr) % MMU_REQ_ID_BIT_MODULO) == ((b << 8) | (d << 3) | f)) \
     60 	)
     61 
     62 /*
     63  * Faults, upsets and defects
     64  */
     65 /* N2 Asic */
     66 fru hostbridge/pciexrc;
     67 asru hostbridge/pciexrc;
     68 event fault.io.fire.asic@hostbridge/pciexrc,
     69     FITrate=HB_FIT, FRU=hostbridge/pciexrc, ASRU=hostbridge/pciexrc;
     70 event fault.io.n2.soc@hostbridge/pciexrc,
     71     FITrate=HB_FIT, FRU=hostbridge/pciexrc, ASRU=hostbridge/pciexrc;
     72 event fault.io.n2.crossbar@hostbridge/pciexrc,
     73     FITrate=HB_FIT, FRU=hostbridge/pciexrc, ASRU=hostbridge/pciexrc;
     74 event fault.io.n2.dmu@hostbridge/pciexrc,
     75     FITrate=HB_FIT, FRU=hostbridge/pciexrc, ASRU=hostbridge/pciexrc;
     76 event fault.io.n2.ncu@hostbridge/pciexrc,
     77     FITrate=HB_FIT, FRU=hostbridge/pciexrc, ASRU=hostbridge/pciexrc;
     78 event fault.io.n2.siu@hostbridge/pciexrc,
     79     FITrate=HB_FIT, FRU=hostbridge/pciexrc, ASRU=hostbridge/pciexrc;
     80 event fault.io.n2.niu@hostbridge/pciexrc,
     81     FITrate=HB_FIT, FRU=hostbridge/pciexrc, ASRU=hostbridge/pciexrc;
     82 
     83 /* No diagnosis */
     84 event upset.io.fire.nodiag@hostbridge;
     85 
     86 /*
     87  * Additional "DMC" errors to fire.
     88  * N2 asic parity error
     89  */
     90 event ereport.io.n2.dmu.iotsbdesc_dpe@hostbridge/pciexrc{within(5s)};
     91 
     92 /*
     93  * Additional "PEC" errors to fire.
     94  */
     95 event ereport.io.n2.peu.err_sds_los@hostbridge/pciexrc{within(5s)};
     96 event ereport.io.n2.peu.lwc@hostbridge/pciexrc{within(5s)};
     97 event ereport.io.n2.peu.nfp@hostbridge/pciexrc{within(5s)};
     98 
     99 /*
    100  * Unique SOC errors to N2
    101  */
    102 /* fault.io.n2.soc */
    103 event ereport.io.n2.soc.ncumondotable@hostbridge/pciexrc{within(5s)};
    104 event ereport.io.n2.soc.ncuctagce@hostbridge/pciexrc{within(5s)};
    105 event ereport.io.n2.soc.ncuinttable@hostbridge/pciexrc{within(5s)};
    106 event ereport.io.n2.soc.ncudataparity@hostbridge/pciexrc{within(5s)};
    107 
    108 /* fault.io.n2.crossbar */
    109 event ereport.io.n2.soc.ncupcxdata@hostbridge/pciexrc{within(5s)};
    110 event ereport.io.n2.soc.ncudmucredit@hostbridge/pciexrc{within(5s)};
    111 
    112 /* fault.io.n2.dmu */
    113 event ereport.io.n2.soc.siidmuctague@hostbridge/pciexrc{within(5s)};
    114 event ereport.io.n2.soc.siidmuctagce@hostbridge/pciexrc{within(5s)};
    115 event ereport.io.n2.soc.siidmuaparity@hostbridge/pciexrc{within(5s)};
    116 event ereport.io.n2.soc.siidmudparity@hostbridge/pciexrc{within(5s)};
    117 event ereport.io.n2.soc.dmuinternal@hostbridge/pciexrc;
    118 
    119 /* fault.io.n2.ncu */
    120 event ereport.io.n2.soc.ncupcxue@hostbridge/pciexrc{within(5s)};
    121 event ereport.io.n2.soc.dmuncucredit@hostbridge/pciexrc{within(5s)};
    122 event ereport.io.n2.soc.ncumondofifo@hostbridge/pciexrc{within(5s)};
    123 event ereport.io.n2.soc.ncucpxue@hostbridge/pciexrc{within(5s)};
    124 event ereport.io.n2.soc.ncudmuue@hostbridge/pciexrc{within(5s)};
    125 
    126 /* fault.io.n2.siu */
    127 event ereport.io.n2.soc.ncuctague@hostbridge/pciexrc{within(5s)};
    128 event ereport.io.n2.soc.sioctague@hostbridge/pciexrc{within(5s)};
    129 event ereport.io.n2.soc.dmusiicredit@hostbridge/pciexrc{within(5s)};
    130 event ereport.io.n2.soc.dmudataparity@hostbridge/pciexrc{within(5s)};
    131 event ereport.io.n2.soc.sioctagce@hostbridge/pciexrc{within(5s)};
    132 event ereport.io.n2.soc.dmuctagce@hostbridge/pciexrc{within(5s)};
    133 event ereport.io.n2.soc.dmuctague@hostbridge/pciexrc{within(5s)};
    134 
    135 /* fault.io.n2.niu */
    136 event ereport.io.n2.soc.siiniuctagce@hostbridge/pciexrc{within(5s)};
    137 event ereport.io.n2.soc.siiniuctague@hostbridge/pciexrc{within(5s)};
    138 event ereport.io.n2.soc.siiniuaparity@hostbridge/pciexrc{within(5s)};
    139 event ereport.io.n2.soc.siiniudparity@hostbridge/pciexrc{within(5s)};
    140 event ereport.io.n2.soc.niuctague@hostbridge/pciexrc{within(5s)};
    141 event ereport.io.n2.soc.niuctagce@hostbridge/pciexrc{within(5s)};
    142 event ereport.io.n2.soc.niudataparity@hostbridge/pciexrc{within(5s)};
    143 
    144 /* fault.io.niu/niufn */
    145 event ereport.io.device.inval_state@niu/niufn{within(5s)};
    146 event ereport.io.device.no_response@niu/niufn{within(5s)};
    147 event ereport.io.device.stall@niu/niufn{within(5s)};
    148 event ereport.io.device.badint_limit@niu/niufn{within(5s)};
    149 event ereport.io.device.intern_corr@niu/niufn{within(5s)};
    150 event ereport.io.device.intern_uncorr@niu/niufn{within(5s)};
    151 event ereport.io.device.nf-device@niu/niufn;
    152 
    153 /*
    154  * Fault at the adjacent node which is right below the Fire ASIC
    155  */
    156 event error.io.fire.pec.adjacentnode@hostbridge/pciexrc;
    157 
    158 prop error.io.fire.pec.adjacentnode@hostbridge/pciexrc (0) ->
    159     ereport.io.n2.peu.nfp@hostbridge/pciexrc;
    160 
    161 /*
    162  * DMU N2 asic parity error
    163  */
    164 prop fault.io.fire.asic@hostbridge/pciexrc (0)->
    165     ereport.io.n2.dmu.iotsbdesc_dpe@hostbridge/pciexrc;
    166 
    167 /*
    168  * Surprise remove or serdes los, similar to fire ldn event,
    169  * don't diag.
    170  */
    171 prop upset.io.fire.nodiag@hostbridge (0)->
    172     ereport.io.n2.peu.err_sds_los@hostbridge/pciexrc,
    173     ereport.io.n2.peu.lwc@hostbridge/pciexrc;
    174 
    175 /* SOC Errors */
    176 /* fault.io.n2.soc */
    177 prop fault.io.n2.soc@hostbridge/pciexrc (1)->
    178 	ereport.io.n2.soc.ncumondotable@hostbridge/pciexrc,
    179 	ereport.io.n2.soc.ncuctagce@hostbridge/pciexrc,
    180 	ereport.io.n2.soc.ncuinttable@hostbridge/pciexrc,
    181 	ereport.io.n2.soc.ncudataparity@hostbridge/pciexrc;
    182 
    183 /* fault.io.n2.crossbar */
    184 prop fault.io.n2.crossbar@hostbridge/pciexrc (1)->
    185 	ereport.io.n2.soc.ncudmucredit@hostbridge/pciexrc,
    186 	ereport.io.n2.soc.ncupcxdata@hostbridge/pciexrc;
    187 
    188 /* fault.io.n2.dmu */
    189 prop fault.io.n2.dmu@hostbridge/pciexrc (1)->
    190 	ereport.io.n2.soc.siidmuctague@hostbridge/pciexrc,
    191 	ereport.io.n2.soc.siidmuctagce@hostbridge/pciexrc,
    192 	ereport.io.n2.soc.siidmuaparity@hostbridge/pciexrc,
    193 	ereport.io.n2.soc.siidmudparity@hostbridge/pciexrc,
    194 	ereport.io.n2.soc.dmuinternal@hostbridge/pciexrc;
    195 
    196 /* fault.io.n2.ncu */
    197 prop fault.io.n2.ncu@hostbridge/pciexrc (1)->
    198 	ereport.io.n2.soc.ncupcxue@hostbridge/pciexrc,
    199 	ereport.io.n2.soc.dmuncucredit@hostbridge/pciexrc,
    200 	ereport.io.n2.soc.ncumondofifo@hostbridge/pciexrc,
    201 	ereport.io.n2.soc.ncucpxue@hostbridge/pciexrc,
    202 	ereport.io.n2.soc.ncudmuue@hostbridge/pciexrc;
    203 
    204 /* fault.io.n2.siu */
    205 prop fault.io.n2.siu@hostbridge/pciexrc (1)->
    206 	ereport.io.n2.soc.ncuctague@hostbridge/pciexrc,
    207 	ereport.io.n2.soc.sioctague@hostbridge/pciexrc,
    208 	ereport.io.n2.soc.dmusiicredit@hostbridge/pciexrc,
    209 	ereport.io.n2.soc.dmudataparity@hostbridge/pciexrc,
    210 	ereport.io.n2.soc.sioctagce@hostbridge/pciexrc,
    211 	ereport.io.n2.soc.dmuctagce@hostbridge/pciexrc,
    212 	ereport.io.n2.soc.dmuctague@hostbridge/pciexrc;
    213 
    214 /* fault.io.n2.niu */
    215 prop fault.io.n2.niu@hostbridge/pciexrc (0)->
    216 	ereport.io.n2.soc.siiniuctague@hostbridge/pciexrc,
    217 	ereport.io.n2.soc.siiniuaparity@hostbridge/pciexrc,
    218 	ereport.io.n2.soc.siiniudparity@hostbridge/pciexrc,
    219 	ereport.io.n2.soc.siiniuctagce@hostbridge/pciexrc,
    220 	ereport.io.n2.soc.niuctague@hostbridge/pciexrc,
    221 	ereport.io.n2.soc.niuctagce@hostbridge/pciexrc,
    222 	ereport.io.n2.soc.niudataparity@hostbridge/pciexrc;
    223 
    224 /* n2 niu/niufn */
    225 event error.io.device.f-device@niu/niufn;
    226 event error.io.device.nf-device@niu/niufn;
    227 event error.io.service.restored@niu/niufn;
    228 event ereport.io.service.lost@niu/niufn{within(5s)};
    229 event ereport.io.service.restored@niu/niufn{within(30s)};
    230 event ereport.io.service.degraded@niu/niufn{within(5s)};
    231 event ereport.io.service.unaffected@niu/niufn{within(5s)};
    232 
    233 /* fault error propogation */
    234 prop fault.io.n2.niu@hostbridge/pciexrc (0)->
    235         error.io.device.f-device@niu/niufn,
    236         error.io.device.nf-device@niu/niufn;
    237 
    238 /* fault.io.niu/niufn */
    239 prop error.io.service.restored@niu/niufn (1)->
    240 	ereport.io.service.lost@niu/niufn,
    241 	ereport.io.service.degraded@niu/niufn;
    242 
    243 prop error.io.service.restored@niu/niufn (1)->
    244     ereport.io.service.restored@niu/niufn;
    245 
    246 prop error.io.device.f-device@niu/niufn (1)->
    247     ereport.io.device.inval_state@niu/niufn,
    248     ereport.io.device.no_response@niu/niufn,
    249     ereport.io.device.stall@niu/niufn,
    250     ereport.io.device.badint_limit@niu/niufn,
    251     ereport.io.device.intern_corr@niu/niufn,
    252     ereport.io.device.intern_uncorr@niu/niufn;
    253 
    254 prop error.io.device.f-device@niu/niufn (1)->
    255     ereport.io.service.lost@niu/niufn,
    256     ereport.io.service.degraded@niu/niufn;
    257 
    258 engine serd.io.device.nonfatal@niu/niufn,
    259     N=NONFATAL_COUNT, T=NONFATAL_TIME, method=persistent,
    260     trip=ereport.io.device.nf-device@niu/niufn;
    261 
    262 event upset.io.device.nonfatal@niu/niufn,
    263     engine=serd.io.device.nonfatal@niu/niufn;
    264 
    265 prop error.io.device.nf-device@niu/niufn (1)->
    266     ereport.io.device.nf-device@niu/niufn;
    267 
    268 prop error.io.device.nf-device@niu/niufn (0)->
    269     ereport.io.device.inval_state@niu/niufn,
    270     ereport.io.device.no_response@niu/niufn,
    271     ereport.io.device.stall@niu/niufn,
    272     ereport.io.device.badint_limit@niu/niufn,
    273     ereport.io.device.intern_corr@niu/niufn,
    274     ereport.io.device.intern_uncorr@niu/niufn,
    275     ereport.io.service.unaffected@niu/niufn,
    276     error.io.service.restored@niu/niufn;
    277 
    278 prop upset.io.device.nonfatal@niu/niufn (1)->
    279     ereport.io.device.inval_state@niu/niufn,
    280     ereport.io.device.no_response@niu/niufn,
    281     ereport.io.device.stall@niu/niufn,
    282     ereport.io.device.badint_limit@niu/niufn,
    283     ereport.io.device.intern_corr@niu/niufn,
    284     ereport.io.device.intern_uncorr@niu/niufn;
    285 
    286 prop upset.io.device.nonfatal@niu/niufn (1)->
    287     ereport.io.service.unaffected@niu/niufn,
    288     error.io.service.restored@niu/niufn;
    289