125cf1a30Sjl/*
225cf1a30Sjl * CDDL HEADER START
325cf1a30Sjl *
425cf1a30Sjl * The contents of this file are subject to the terms of the
525cf1a30Sjl * Common Development and Distribution License (the "License").
625cf1a30Sjl * You may not use this file except in compliance with the License.
725cf1a30Sjl *
825cf1a30Sjl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
925cf1a30Sjl * or http://www.opensolaris.org/os/licensing.
1025cf1a30Sjl * See the License for the specific language governing permissions
1125cf1a30Sjl * and limitations under the License.
1225cf1a30Sjl *
1325cf1a30Sjl * When distributing Covered Code, include this CDDL HEADER in each
1425cf1a30Sjl * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1525cf1a30Sjl * If applicable, add the following below this CDDL HEADER, with the
1625cf1a30Sjl * fields enclosed by brackets "[]" replaced with your own identifying
1725cf1a30Sjl * information: Portions Copyright [yyyy] [name of copyright owner]
1825cf1a30Sjl *
1925cf1a30Sjl * CDDL HEADER END
2025cf1a30Sjl */
2125cf1a30Sjl/*
22*b7d3956bSstephh * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
2325cf1a30Sjl * Use is subject to license terms.
2425cf1a30Sjl */
2525cf1a30Sjl
2625cf1a30Sjl#pragma ident	"%Z%%M%	%I%	%E% SMI"
2725cf1a30Sjl
2825cf1a30Sjl/*
2925cf1a30Sjl * Eversholt rules for Oberon ASICs
3025cf1a30Sjl */
3125cf1a30Sjl
3225cf1a30Sjl#pragma dictionary "SUN4U"
3325cf1a30Sjl
3425cf1a30Sjl#define HB_FIT            1000
3525cf1a30Sjl
3625cf1a30Sjl/*
3725cf1a30Sjl * Test for primary or secondary ereports
3825cf1a30Sjl */
3925cf1a30Sjl#define IS_PRIMARY (payloadprop("primary"))
4025cf1a30Sjl#define IS_SECONDARY (! payloadprop("primary"))
4125cf1a30Sjl
4225cf1a30Sjlevent error.io.oberon.pec.secondary@hostbridge/pciexrc;
4325cf1a30Sjlevent error.io.oberon.pec.fabric_error@hostbridge/pciexrc;
4425cf1a30Sjl
4525cf1a30Sjl/*
4625cf1a30Sjl * Ereports derived from the
4725cf1a30Sjl * UBC Status Clear Register
4825cf1a30Sjl *
4925cf1a30Sjl *    dmarduea-channel	DMA read uncorrectable error (UE) in leaf A
5025cf1a30Sjl *    dmawtuea		DMA write UE in leaf A
5125cf1a30Sjl *    memrdaxa  	Memory read invalid address error in leaf A
5225cf1a30Sjl *    memwtaxa  	Memory write invalid address error in leaf A
5325cf1a30Sjl *    dmardueb-channel  DMA read uncorrectable error (UE) in leaf B
5425cf1a30Sjl *    dmawtueb		DMA write UE in leaf B
5525cf1a30Sjl *    memrdaxb		Memory read invalid address error in leaf B
5625cf1a30Sjl *    memwtaxb		Memory write invalid address error in leaf B
5725cf1a30Sjl *    piowtue-channel	PIO write UE
5825cf1a30Sjl *    piowbeue-channel	PIO write byte enable UE
5925cf1a30Sjl *    piorbeue-channel	PIO read byte enable UE
6025cf1a30Sjl */
6125cf1a30Sjlevent ereport.io.oberon.ubc.dmarduea-channel@hostbridge/pciexrc{within(5s)};
6225cf1a30Sjlevent ereport.io.oberon.ubc.dmawtuea@hostbridge/pciexrc{within(5s)};
6325cf1a30Sjlevent ereport.io.oberon.ubc.memrdaxa@hostbridge/pciexrc{within(5s)};
6425cf1a30Sjlevent ereport.io.oberon.ubc.memwtaxa@hostbridge/pciexrc{within(5s)};
6525cf1a30Sjlevent ereport.io.oberon.ubc.dmardueb-channel@hostbridge/pciexrc{within(5s)};
6625cf1a30Sjlevent ereport.io.oberon.ubc.dmawtueb@hostbridge/pciexrc{within(5s)};
6725cf1a30Sjlevent ereport.io.oberon.ubc.memrdaxb@hostbridge/pciexrc{within(5s)};
6825cf1a30Sjlevent ereport.io.oberon.ubc.memwtaxb@hostbridge/pciexrc{within(5s)};
6925cf1a30Sjlevent ereport.io.oberon.ubc.piowtue-channel@hostbridge/pciexrc{within(5s)};
7025cf1a30Sjlevent ereport.io.oberon.ubc.piowbeue-channel@hostbridge/pciexrc{within(5s)};
7125cf1a30Sjlevent ereport.io.oberon.ubc.piorbeue-channel@hostbridge/pciexrc{within(5s)};
7225cf1a30Sjl
7325cf1a30Sjl/*
7425cf1a30Sjl *    tlueitmo	TLU Egress Issue Timeout
7525cf1a30Sjl */
7625cf1a30Sjlevent ereport.io.oberon.pec.tlueitmo@hostbridge/pciexrc{within(5s)};
7725cf1a30Sjl
7825cf1a30Sjl/*
7925cf1a30Sjl * TLU Uncorrectable and Correctable ereports
8025cf1a30Sjl *
8125cf1a30Sjl *     ecrc	End-to-end CRC error
8225cf1a30Sjl */
8325cf1a30Sjlevent ereport.io.oberon.pec.ecrc@hostbridge/pciexrc{within(5s)};
8425cf1a30Sjl
8525cf1a30Sjl/*
8625cf1a30Sjl * A faulty Oberon may cause;
8725cf1a30Sjl *
8825cf1a30Sjl *  - DMA write internal RAM UE: dmawtuea, dmawtueb
8925cf1a30Sjl *  - TLU ECRC
9025cf1a30Sjl *
9125cf1a30Sjl *  Errors marked with * may cause PCI-E abort
9225cf1a30Sjl */
9325cf1a30Sjl
9481f63062Sarutzfru hostbridge;
9581f63062Sarutzasru hostbridge;
9681f63062Sarutzevent fault.io.oberon@hostbridge,
9781f63062Sarutz    FITrate=HB_FIT, FRU=hostbridge, ASRU=hostbridge;
9881f63062Sarutzprop fault.io.oberon@hostbridge (0)->
9981f63062Sarutz    ereport.io.oberon.ubc.dmawtuea@hostbridge/pciexrc,
10081f63062Sarutz    ereport.io.oberon.ubc.dmawtueb@hostbridge/pciexrc;
10125cf1a30Sjlevent fault.io.oberon@hostbridge/pciexrc,
10281f63062Sarutz    FITrate=HB_FIT, FRU=hostbridge, ASRU=hostbridge;
10325cf1a30Sjlprop fault.io.oberon@hostbridge/pciexrc (0)->
10425cf1a30Sjl    ereport.io.oberon.pec.ecrc@hostbridge/pciexrc { IS_PRIMARY };
10525cf1a30Sjl
10625cf1a30Sjl/*
10725cf1a30Sjl * A faulty PX nexus driver can cause
10825cf1a30Sjl * - Jbus unmapped error
10925cf1a30Sjl * - mmu invalid, out of range, protection etc. all except data parity
11025cf1a30Sjl * - invalid pio r/w
11125cf1a30Sjl * - unsolicited read or interrupt return
11225cf1a30Sjl * - msg received to unenabled queue
11325cf1a30Sjl */
11425cf1a30Sjl
115261a51afSet#define SW_FIT			5000	/* No real fit rate, SW */
116*b7d3956bSstephhevent fault.io.fire.hb.sw-config@hostbridge/pciexrc, retire=0, response=0,
117261a51afSet    FITrate=SW_FIT;
11825cf1a30Sjl
119261a51afSetprop fault.io.fire.hb.sw-config@hostbridge/pciexrc (0)->
12025cf1a30Sjl    ereport.io.oberon.ubc.memrdaxa@hostbridge/pciexrc,
12125cf1a30Sjl    ereport.io.oberon.ubc.memrdaxb@hostbridge/pciexrc,
12225cf1a30Sjl    ereport.io.oberon.ubc.memwtaxa@hostbridge/pciexrc,
12325cf1a30Sjl    ereport.io.oberon.ubc.memwtaxb@hostbridge/pciexrc;
12425cf1a30Sjl
12525cf1a30Sjl/*
12625cf1a30Sjl * Secondary errors of the ereport that the device is at fault.
12725cf1a30Sjl * Undiagnosed the secondary errors since the payload is invalid.
12825cf1a30Sjl */
12925cf1a30Sjlprop error.io.oberon.pec.secondary@hostbridge/pciexrc (0) ->
13025cf1a30Sjl    ereport.io.oberon.pec.ecrc@hostbridge/pciexrc{ IS_SECONDARY };
13125cf1a30Sjl
13225cf1a30Sjl/*
13325cf1a30Sjl * For logging purpose only.
13425cf1a30Sjl * The px nexus driver generates equivalent pciex ereports for the
13525cf1a30Sjl * common pciex rules to diagnose.
13625cf1a30Sjl */
13725cf1a30Sjlprop error.io.oberon.pec.fabric_error@hostbridge/pciexrc(0) ->
13825cf1a30Sjl    ereport.io.oberon.pec.ecrc@hostbridge/pciexrc;
13925cf1a30Sjl
14025cf1a30Sjlevent ereport.io.oberon.nodiag@hostbridge;
14125cf1a30Sjl
14225cf1a30Sjl/*
14325cf1a30Sjl * Upset used to hide ereports that are not currently diagnosed.
14425cf1a30Sjl */
14525cf1a30Sjlengine serd.io.oberon.nodiag@hostbridge,
14625cf1a30Sjl    N=1000, T=1s, method=persistent,
14725cf1a30Sjl    trip=ereport.io.oberon.nodiag@hostbridge;
14825cf1a30Sjl
14925cf1a30Sjlevent upset.io.oberon.nodiag@hostbridge,
15025cf1a30Sjl    engine=serd.io.oberon.nodiag@hostbridge;
15125cf1a30Sjl
15225cf1a30Sjlprop upset.io.oberon.nodiag@hostbridge (0)->
15325cf1a30Sjl   ereport.io.oberon.ubc.dmarduea-channel@hostbridge/pciexrc,
15425cf1a30Sjl   ereport.io.oberon.ubc.dmardueb-channel@hostbridge/pciexrc,
15525cf1a30Sjl   ereport.io.oberon.ubc.piowtue-channel@hostbridge/pciexrc,
15625cf1a30Sjl   ereport.io.oberon.ubc.piowbeue-channel@hostbridge/pciexrc,
15725cf1a30Sjl   ereport.io.oberon.ubc.piorbeue-channel@hostbridge/pciexrc,
15825cf1a30Sjl   ereport.io.oberon.pec.tlueitmo@hostbridge/pciexrc,
15925cf1a30Sjl   error.io.oberon.pec.fabric_error@hostbridge/pciexrc,
16025cf1a30Sjl   ereport.io.oberon.nodiag@hostbridge;
161