17c478bd9Sstevel@tonic-gate/*
27c478bd9Sstevel@tonic-gate * CDDL HEADER START
37c478bd9Sstevel@tonic-gate *
47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the
500d0963fSdilpreet * Common Development and Distribution License (the "License").
600d0963fSdilpreet * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate *
87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate * and limitations under the License.
127c478bd9Sstevel@tonic-gate *
137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate *
197c478bd9Sstevel@tonic-gate * CDDL HEADER END
207c478bd9Sstevel@tonic-gate */
217c478bd9Sstevel@tonic-gate/*
22*b7d3956bSstephh * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate * Use is subject to license terms.
247c478bd9Sstevel@tonic-gate */
257c478bd9Sstevel@tonic-gate
267c478bd9Sstevel@tonic-gate#pragma ident	"%Z%%M%	%I%	%E% SMI"
277c478bd9Sstevel@tonic-gate
287c478bd9Sstevel@tonic-gate#pragma dictionary "SUN4U"
297c478bd9Sstevel@tonic-gate
307c478bd9Sstevel@tonic-gate#define	AGENT_ID_MASK	0x1f
317c478bd9Sstevel@tonic-gate#define	AGENT_ID_SHIFT	24
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gate#define	HB_FIT		1000
347c478bd9Sstevel@tonic-gate#define HBUS_FIT	1000
357c478bd9Sstevel@tonic-gate#define PCI_BUS_FIT	500
367c478bd9Sstevel@tonic-gate#define PCI_DEV_FIT	1000
377c478bd9Sstevel@tonic-gate#define	CPU_FIT		500
387c478bd9Sstevel@tonic-gate
397c478bd9Sstevel@tonic-gate#define	PCI_HB_DEV_PATH hostbridge/pcibus/pcidev[32]/pcifn[0]
407c478bd9Sstevel@tonic-gate
417c478bd9Sstevel@tonic-gatefru hostbridge;
427c478bd9Sstevel@tonic-gateasru hostbridge;
437c478bd9Sstevel@tonic-gate
447c478bd9Sstevel@tonic-gateevent fault.io.psycho@hostbridge,
457c478bd9Sstevel@tonic-gate    FITrate=HB_FIT, FRU=hostbridge, ASRU=hostbridge;
467c478bd9Sstevel@tonic-gate
47ac4d633fSstephhevent error.io.psy.ecc.thresh@hostbridge;
487c478bd9Sstevel@tonic-gateevent ereport.io.psy.ecc.pue@hostbridge{within(5s)};
497c478bd9Sstevel@tonic-gateevent ereport.io.psy.ecc.s-pue@hostbridge{within(5s)};
507c478bd9Sstevel@tonic-gateevent ereport.io.psy.ecc.thresh@hostbridge;
517c478bd9Sstevel@tonic-gate
527c478bd9Sstevel@tonic-gate/*
537c478bd9Sstevel@tonic-gate * A faulty Psycho hostbridge may cause:
547c478bd9Sstevel@tonic-gate *
557c478bd9Sstevel@tonic-gate *  - pue:	the psycho to detect a PIO uncorrectable error, bad reader.
567c478bd9Sstevel@tonic-gate *  - s-pue:	the psycho to detect a secondary PIO UE, bad reader.
577c478bd9Sstevel@tonic-gate *  - ecc:	the SERD engine to gather enough PIO CEs to generate an ereport.
587c478bd9Sstevel@tonic-gate */
597c478bd9Sstevel@tonic-gateprop fault.io.psycho@hostbridge (0)->
607c478bd9Sstevel@tonic-gate    ereport.io.psy.ecc.pue@hostbridge,
617c478bd9Sstevel@tonic-gate    ereport.io.psy.ecc.s-pue@hostbridge,
62ac4d633fSstephh    error.io.psy.ecc.thresh@hostbridge;
637c478bd9Sstevel@tonic-gate
647c478bd9Sstevel@tonic-gateengine serd.io.psycho.ecc@hostbridge,
657c478bd9Sstevel@tonic-gate    N=3, T=1day, method=persistent,
667c478bd9Sstevel@tonic-gate    trip=ereport.io.psy.ecc.thresh@hostbridge;
677c478bd9Sstevel@tonic-gate
687c478bd9Sstevel@tonic-gateevent upset.io.psycho@hostbridge,
697c478bd9Sstevel@tonic-gate    engine=serd.io.psycho.ecc@hostbridge;
707c478bd9Sstevel@tonic-gate
717c478bd9Sstevel@tonic-gateevent ereport.io.psy.ecc.pce@hostbridge{within(5s)};
727c478bd9Sstevel@tonic-gateevent ereport.io.psy.ecc.s-pce@hostbridge{within(5s)};
737c478bd9Sstevel@tonic-gate
74ac4d633fSstephhprop error.io.psy.ecc.thresh@hostbridge (2)->
75ac4d633fSstephh    ereport.io.psy.ecc.thresh@hostbridge,
76ac4d633fSstephh    ereport.io.psy.ecc.pce@hostbridge;
77ac4d633fSstephh
787c478bd9Sstevel@tonic-gate/*
797c478bd9Sstevel@tonic-gate * An upset Psycho may cause:
807c478bd9Sstevel@tonic-gate *
817c478bd9Sstevel@tonic-gate *  - pce:	the psycho to detect a PIO correctable error, bad reader.
827c478bd9Sstevel@tonic-gate */
837c478bd9Sstevel@tonic-gateprop upset.io.psycho@hostbridge (0)->
847c478bd9Sstevel@tonic-gate    ereport.io.psy.ecc.pce@hostbridge;
857c478bd9Sstevel@tonic-gate
867c478bd9Sstevel@tonic-gateevent fault.io.hbus@hostbridge,
877c478bd9Sstevel@tonic-gate    FITrate=HBUS_FIT, FRU=hostbridge, ASRU=hostbridge;
887c478bd9Sstevel@tonic-gate
897c478bd9Sstevel@tonic-gate/*
907c478bd9Sstevel@tonic-gate * A faulty host bus may cause:
917c478bd9Sstevel@tonic-gate *
927c478bd9Sstevel@tonic-gate *  - pue:	a PIO uncorrectable error.
937c478bd9Sstevel@tonic-gate *  - s-pue:	a secondary PIO UE.
947c478bd9Sstevel@tonic-gate *  - ecc:	the SERD engine to gather enough PIO CEs to generate an ereport.
957c478bd9Sstevel@tonic-gate */
967c478bd9Sstevel@tonic-gateprop fault.io.hbus@hostbridge (0)->
977c478bd9Sstevel@tonic-gate    ereport.io.psy.ecc.pue@hostbridge,
987c478bd9Sstevel@tonic-gate    ereport.io.psy.ecc.s-pue@hostbridge,
99ac4d633fSstephh    error.io.psy.ecc.thresh@hostbridge;
1007c478bd9Sstevel@tonic-gate
1017c478bd9Sstevel@tonic-gatefru cpu;
1027c478bd9Sstevel@tonic-gate
103*b7d3956bSstephhevent fault.io.datapath@cpu, retire=0,
1047c478bd9Sstevel@tonic-gate    FITrate=CPU_FIT, FRU=cpu;
1057c478bd9Sstevel@tonic-gate
106ac4d633fSstephhevent error.io.cpu.ecc.thresh@cpu;
1077c478bd9Sstevel@tonic-gate
1087c478bd9Sstevel@tonic-gate/*
1097c478bd9Sstevel@tonic-gate * A faulty CPU may cause:
1107c478bd9Sstevel@tonic-gate *
1117c478bd9Sstevel@tonic-gate *  - pue:	a PIO uncorrectable error, where the captured Agentid matches
1127c478bd9Sstevel@tonic-gate *		the cpuid.
1137c478bd9Sstevel@tonic-gate *  - ecc:	the SERD engine for the CPU to fire due to PIO CEs from this
1147c478bd9Sstevel@tonic-gate *		CPU
1157c478bd9Sstevel@tonic-gate */
1167c478bd9Sstevel@tonic-gateprop fault.io.datapath@cpu[cpuid] (0)->
1177c478bd9Sstevel@tonic-gate    ereport.io.psy.ecc.pue@hostbridge
118ac4d633fSstephh    {((payloadprop("ecc-afsr") >> AGENT_ID_SHIFT) & AGENT_ID_MASK) == cpuid};
1197c478bd9Sstevel@tonic-gate
120ac4d633fSstephhprop fault.io.datapath@cpu (0)->
121ac4d633fSstephh    error.io.cpu.ecc.thresh@cpu;
1227c478bd9Sstevel@tonic-gate
123ac4d633fSstephhprop error.io.cpu.ecc.thresh@cpu (1)->
124ac4d633fSstephh    ereport.io.psy.ecc.thresh@hostbridge<>;
1257c478bd9Sstevel@tonic-gate
126ac4d633fSstephhprop error.io.cpu.ecc.thresh@cpu[cpuid] (1)->
127ac4d633fSstephh    ereport.io.psy.ecc.pce@hostbridge<>
1287c478bd9Sstevel@tonic-gate    {((payloadprop("ecc-afsr") >> AGENT_ID_SHIFT) & AGENT_ID_MASK) == cpuid};
1297c478bd9Sstevel@tonic-gate
1307c478bd9Sstevel@tonic-gateasru pcibus/pcidev/pcifn;
1317c478bd9Sstevel@tonic-gatefru pcibus/pcidev;
1327c478bd9Sstevel@tonic-gate
13300d0963fSdilpreetevent fault.io.pci.device-interr@hostbridge/pcibus/pcidev/pcifn,
13400d0963fSdilpreet    FITrate=PCI_DEV_FIT, FRU=pcibus/pcidev, ASRU=pcibus/pcidev/pcifn;
13500d0963fSdilpreet
13600d0963fSdilpreetevent fault.io.pci.device-interr@pcibus/pcidev/pcifn,
1377c478bd9Sstevel@tonic-gate    FITrate=PCI_DEV_FIT, FRU=pcibus/pcidev, ASRU=pcibus/pcidev/pcifn;
1387c478bd9Sstevel@tonic-gate
1397c478bd9Sstevel@tonic-gateevent error.io.psy.pbm.rl@hostbridge/pcibus/pcidev/pcifn;
14000d0963fSdilpreetevent error.io.psy.pbm.rl@pcibus/pcidev/pcifn;
14100d0963fSdilpreetevent error.io.psy.pbm.rl@pcibus/pcidev/pcifn/pcibus/pcidev/pcifn;
14200d0963fSdilpreetevent error.io.psy.pbm.target-rl@pcibus/pcidev/pcifn;
14300d0963fSdilpreetevent error.io.psy.pbm.target-rl@pcibus/pcidev/pcifn/pcibus/pcidev/pcifn;
14400d0963fSdilpreetevent error.io.pci.ma-u@hostbridge/pcibus/pcidev/pcifn;
14500d0963fSdilpreetevent error.io.pci.perr-pw-u@hostbridge/pcibus/pcidev/pcifn;
14600d0963fSdilpreetevent error.io.pci.perr-dw-u@hostbridge/pcibus/pcidev/pcifn;
14700d0963fSdilpreetevent error.io.pci.dpdata-dr-u@hostbridge/pcibus/pcidev/pcifn;
14800d0963fSdilpreetevent error.io.pci.ta-u@hostbridge/pcibus/pcidev/pcifn;
14900d0963fSdilpreetevent error.io.pci.serr-u@hostbridge/pcibus/pcidev/pcifn;
15000d0963fSdilpreetevent error.io.pci.retry-to-d@hostbridge/pcibus/pcidev/pcifn;
1517c478bd9Sstevel@tonic-gateevent error.psy.cpu.berr@cpu;
1527c478bd9Sstevel@tonic-gate
1537c478bd9Sstevel@tonic-gateevent ereport.io.psy.sbh@hostbridge/pcibus/pcidev/pcifn{within(5s)};
1547c478bd9Sstevel@tonic-gateevent ereport.io.psy.pbm.rl@hostbridge/pcibus/pcidev/pcifn{within(5s)};
1557c478bd9Sstevel@tonic-gateevent ereport.io.psy.pbm.s-rl@hostbridge/pcibus/pcidev/pcifn{within(5s)};
1567c478bd9Sstevel@tonic-gateevent ereport.io.psy.pbm.s-ma@hostbridge/pcibus/pcidev/pcifn{within(5s)};
1577c478bd9Sstevel@tonic-gateevent ereport.io.psy.pbm.s-rta@hostbridge/pcibus/pcidev/pcifn{within(5s)};
1587c478bd9Sstevel@tonic-gateevent ereport.io.psy.pbm.s-mdpe@hostbridge/pcibus/pcidev/pcifn{within(5s)};
15900d0963fSdilpreetevent ereport.io.psy.pbm.target-rl@pcibus/pcidev/pcifn{within(5s)};
1607c478bd9Sstevel@tonic-gateevent ereport.io.pci.rserr@hostbridge/pcibus/pcidev/pcifn{within(5s)};
1617c478bd9Sstevel@tonic-gateevent ereport.cpu.ultraSPARC-II.berr@cpu{within(5s)};
1627c478bd9Sstevel@tonic-gate
1637c478bd9Sstevel@tonic-gate/*
1647c478bd9Sstevel@tonic-gate * A faulty PCI device may cause:
1657c478bd9Sstevel@tonic-gate *
1667c478bd9Sstevel@tonic-gate *  - rl:	it to retry a transaction beyond the specified limit.
1677c478bd9Sstevel@tonic-gate *  - sbh:	it to generate a streaming byte hole.
16800d0963fSdilpreet *
16900d0963fSdilpreet * For rl, there may be a target-rl ereport on a child device. There may also be
17000d0963fSdilpreet * an associated dto - the retry-to-d error propagates into the pci.esc rules
17100d0963fSdilpreet * to handle this.
1727c478bd9Sstevel@tonic-gate */
1737c478bd9Sstevel@tonic-gate
17400d0963fSdilpreetprop fault.io.pci.device-interr@pcibus/pcidev[fromdev]/pcifn (0)->
17500d0963fSdilpreet    error.io.psy.pbm.rl@pcibus/pcidev<todev>/pcifn {
17600d0963fSdilpreet	fromdev == todev && fromdev != 32 },
17700d0963fSdilpreet    error.io.psy.pbm.target-rl@pcibus/pcidev<todev>/pcifn {
17800d0963fSdilpreet	fromdev == todev && fromdev != 32 };
17900d0963fSdilpreet
18000d0963fSdilpreetprop error.io.psy.pbm.rl@pcibus/pcidev/pcifn/pcibus/pcidev/pcifn (1)->
18100d0963fSdilpreet    error.io.psy.pbm.rl@pcibus/pcidev/pcifn;
1827c478bd9Sstevel@tonic-gate
1837c478bd9Sstevel@tonic-gateprop error.io.psy.pbm.rl@hostbridge/pcibus/pcidev/pcifn (1)->
1847c478bd9Sstevel@tonic-gate    ereport.io.psy.pbm.rl@PCI_HB_DEV_PATH,
1857c478bd9Sstevel@tonic-gate    ereport.io.psy.pbm.s-rl@PCI_HB_DEV_PATH;
1867c478bd9Sstevel@tonic-gate
18700d0963fSdilpreetprop error.io.psy.pbm.target-rl@pcibus/pcidev/pcifn (1)->
18800d0963fSdilpreet    error.io.psy.pbm.target-rl@pcibus/pcidev/pcifn/pcibus<>/pcidev<>/pcifn<>;
18900d0963fSdilpreet
19000d0963fSdilpreetprop error.io.psy.pbm.target-rl@pcibus/pcidev/pcifn (0)->
19100d0963fSdilpreet    ereport.io.psy.pbm.target-rl@pcibus/pcidev/pcifn;
19200d0963fSdilpreet
1937c478bd9Sstevel@tonic-gateprop error.io.psy.pbm.rl@hostbridge/pcibus/pcidev/pcifn (0)->
19400d0963fSdilpreet    error.io.pci.retry-to-d@hostbridge/pcibus/pcidev/pcifn;
1957c478bd9Sstevel@tonic-gate
1967c478bd9Sstevel@tonic-gateprop error.io.psy.pbm.rl@hostbridge/pcibus/pcidev/pcifn (0)->
1977c478bd9Sstevel@tonic-gate    error.psy.cpu.berr@cpu;
1987c478bd9Sstevel@tonic-gate
19900d0963fSdilpreetprop fault.io.pci.device-interr@hostbridge/pcibus/pcidev/pcifn (0)->
20000d0963fSdilpreet    ereport.io.psy.sbh@PCI_HB_DEV_PATH;
20100d0963fSdilpreet
2027c478bd9Sstevel@tonic-gate/*
2037c478bd9Sstevel@tonic-gate * Need to add the following psycho specific propagations to complete the PCI
20400d0963fSdilpreet * fault tree. These are to allow propagations to secondary errors and cpu
20500d0963fSdilpreet * bus errors, and to represent the way the chip raises rserr
20600d0963fSdilpreet * on detection of SERR#
2077c478bd9Sstevel@tonic-gate */
20800d0963fSdilpreetprop error.io.pci.ma-u@hostbridge/pcibus/pcidev/pcifn (0)->
2097c478bd9Sstevel@tonic-gate    ereport.io.psy.pbm.s-ma@PCI_HB_DEV_PATH;
2107c478bd9Sstevel@tonic-gate
21100d0963fSdilpreetprop error.io.pci.ta-u@hostbridge/pcibus/pcidev/pcifn (0)->
2127c478bd9Sstevel@tonic-gate    ereport.io.psy.pbm.s-rta@PCI_HB_DEV_PATH;
2137c478bd9Sstevel@tonic-gate
21400d0963fSdilpreetprop error.io.pci.perr-pw-u@hostbridge/pcibus/pcidev/pcifn (0)->
21500d0963fSdilpreet    ereport.io.psy.pbm.s-mdpe@PCI_HB_DEV_PATH;
21600d0963fSdilpreet
21700d0963fSdilpreetprop error.io.pci.perr-dw-u@hostbridge/pcibus/pcidev/pcifn (0)->
21800d0963fSdilpreet    ereport.io.psy.pbm.s-mdpe@PCI_HB_DEV_PATH;
21900d0963fSdilpreet
22000d0963fSdilpreetprop error.io.pci.dpdata-dr-u@hostbridge/pcibus/pcidev/pcifn (0)->
2217c478bd9Sstevel@tonic-gate    ereport.io.psy.pbm.s-mdpe@PCI_HB_DEV_PATH;
2227c478bd9Sstevel@tonic-gate
22300d0963fSdilpreetprop error.io.pci.ta-u@hostbridge/pcibus/pcidev/pcifn (0)->
2247c478bd9Sstevel@tonic-gate    error.psy.cpu.berr@cpu;
2257c478bd9Sstevel@tonic-gate
22600d0963fSdilpreetprop error.io.pci.dpdata-dr-u@hostbridge/pcibus/pcidev/pcifn (0)->
2277c478bd9Sstevel@tonic-gate    error.psy.cpu.berr@cpu;
2287c478bd9Sstevel@tonic-gate
22900d0963fSdilpreetprop error.io.pci.ma-u@hostbridge/pcibus/pcidev/pcifn (0)->
2307c478bd9Sstevel@tonic-gate    error.psy.cpu.berr@cpu;
2317c478bd9Sstevel@tonic-gate
2327c478bd9Sstevel@tonic-gateprop error.psy.cpu.berr@cpu (0)->
2337c478bd9Sstevel@tonic-gate    ereport.cpu.ultraSPARC-II.berr@cpu;
2347c478bd9Sstevel@tonic-gate
23500d0963fSdilpreetprop error.io.pci.serr-u@hostbridge/pcibus/pcidev/pcifn (1)->
2367c478bd9Sstevel@tonic-gate    ereport.io.pci.rserr@PCI_HB_DEV_PATH;
2377c478bd9Sstevel@tonic-gate
2387c478bd9Sstevel@tonic-gateevent ereport.io.psy.nodiag@hostbridge;
2397c478bd9Sstevel@tonic-gate
2407c478bd9Sstevel@tonic-gate/*
2417c478bd9Sstevel@tonic-gate * Upset used to hide ereports that can not be currently diagnosed.
2427c478bd9Sstevel@tonic-gate */
2437c478bd9Sstevel@tonic-gateengine serd.io.psy.nodiag@hostbridge,
2447c478bd9Sstevel@tonic-gate    N=1000, T=1hour, method=persistent,
2457c478bd9Sstevel@tonic-gate    trip=ereport.io.psy.nodiag@hostbridge;
2467c478bd9Sstevel@tonic-gate
2477c478bd9Sstevel@tonic-gateevent upset.io.psy.nodiag@hostbridge,
2487c478bd9Sstevel@tonic-gate    engine=serd.io.psy.nodiag@hostbridge;
2497c478bd9Sstevel@tonic-gate
2507c478bd9Sstevel@tonic-gateprop upset.io.psy.nodiag@hostbridge (0)->
2517c478bd9Sstevel@tonic-gate    ereport.io.psy.ecc.s-pce@hostbridge,
2527c478bd9Sstevel@tonic-gate    ereport.io.psy.nodiag@hostbridge;
253