xref: /titanic_50/usr/src/uts/intel/sys/fm/cpu/AMD.h (revision 5f149bca52352f45598e5563debe72ce04bd7a21)
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 /*
23  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _SYS_FM_CPU_AMD_H
28 #define	_SYS_FM_CPU_AMD_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /*
37  * AMD model-specific ereports.  These supplement the generic ereport
38  * members specified in GMCA.h.
39  */
40 
41 /* Ereport class subcategory for AMD processors */
42 #define	FM_EREPORT_CPU_AMD	"amd"
43 
44 /*
45  * Ereport payload definitions
46  */
47 #define	FM_EREPORT_PAYLOAD_NAME_SYND		"syndrome"
48 #define	FM_EREPORT_PAYLOAD_NAME_SYND_TYPE	"syndrome-type"
49 #define	FM_EREPORT_PAYLOAD_NAME_RESOURCE	"resource"
50 
51 #define	FM_EREPORT_PAYLOAD_FLAG_SYND		0x0000000000000001
52 #define	FM_EREPORT_PAYLOAD_FLAG_SYND_TYPE	0x0000000000000002
53 #define	FM_EREPORT_PAYLOAD_FLAG_RESOURCE	0x0000000000000004
54 #define	FM_EREPORT_PAYLOAD_FLAG_STACK		0x0000000000000008
55 
56 /*
57  * Model specific payload for each ereport type is specified using the
58  * following groupings of the individual flag values above.
59  */
60 #define	FM_EREPORT_PAYLOAD_FLAGS_COMMON 0x0ULL	/* empty */
61 
62 #define	FM_EREPORT_PAYLOAD_FLAGS_SYND \
63 	(FM_EREPORT_PAYLOAD_FLAG_SYND | FM_EREPORT_PAYLOAD_FLAG_SYND_TYPE)
64 #define	FM_EREPORT_PAYLOAD_FLAGS_RESOURCE \
65 	(FM_EREPORT_PAYLOAD_FLAG_RESOURCE)
66 #define	FM_EREPORT_PAYLOAD_FLAGS_NB \
67 	FM_EREPORT_PAYLOAD_FLAG_STACK
68 
69 #define	FM_EREPORT_PAYLOAD_FLAGS_1(f1) \
70 	(FM_EREPORT_PAYLOAD_FLAGS_COMMON | FM_EREPORT_PAYLOAD_FLAGS_##f1)
71 #define	FM_EREPORT_PAYLOAD_FLAGS_2(f1, f2) \
72 	(FM_EREPORT_PAYLOAD_FLAGS_COMMON | FM_EREPORT_PAYLOAD_FLAGS_##f1 | \
73 	FM_EREPORT_PAYLOAD_FLAGS_##f2)
74 
75 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_INF_SYS_ECC1 \
76 	FM_EREPORT_PAYLOAD_FLAGS_2(SYND, RESOURCE)
77 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_INF_L2_ECC1 \
78 	FM_EREPORT_PAYLOAD_FLAGS_1(SYND)
79 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_INF_SYS_ECCM \
80 	FM_EREPORT_PAYLOAD_FLAGS_2(SYND, RESOURCE)
81 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_INF_L2_ECCM \
82 	FM_EREPORT_PAYLOAD_FLAGS_1(SYND)
83 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_DATA_ECC1 \
84 	FM_EREPORT_PAYLOAD_FLAGS_1(SYND)
85 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_DATA_ECC1_UC \
86 	FM_EREPORT_PAYLOAD_FLAGS_1(SYND)
87 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_DATA_ECCM \
88 	FM_EREPORT_PAYLOAD_FLAGS_1(SYND)
89 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_TAG_PAR \
90 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
91 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_STAG_PAR \
92 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
93 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_L1TLB_PAR \
94 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
95 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_L2TLB_PAR \
96 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
97 
98 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_INF_SYS_ECC1 \
99 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
100 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_INF_L2_ECC1 \
101 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
102 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_INF_SYS_ECCM \
103 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
104 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_INF_L2_ECCM \
105 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
106 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_DATA_PAR \
107 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
108 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_TAG_PAR \
109 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
110 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_STAG_PAR \
111 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
112 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_L1TLB_PAR \
113 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
114 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_L2TLB_PAR \
115 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
116 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_RDDE \
117 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
118 
119 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_L2D_ECC1 \
120 	FM_EREPORT_PAYLOAD_FLAGS_1(SYND)
121 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_L2D_ECCM \
122 	FM_EREPORT_PAYLOAD_FLAGS_1(SYND)
123 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_L2T_PAR \
124 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
125 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_L2T_ECC1 \
126 	FM_EREPORT_PAYLOAD_FLAGS_1(SYND)
127 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_L2T_ECCM \
128 	FM_EREPORT_PAYLOAD_FLAGS_1(SYND)
129 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_S_RDE \
130 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
131 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_S_ECC1 \
132 	FM_EREPORT_PAYLOAD_FLAGS_2(SYND, RESOURCE)
133 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_S_ECCM \
134 	FM_EREPORT_PAYLOAD_FLAGS_2(SYND, RESOURCE)
135 
136 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_LS_S_RDE \
137 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
138 
139 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_MEM_CE \
140 	FM_EREPORT_PAYLOAD_FLAGS_2(SYND, RESOURCE)
141 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_MEM_UE \
142 	FM_EREPORT_PAYLOAD_FLAGS_2(SYND, RESOURCE)
143 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_HT_CRC \
144 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
145 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_HT_SYNC \
146 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
147 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_MA \
148 	FM_EREPORT_PAYLOAD_FLAGS_1(NB)
149 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_TA \
150 	FM_EREPORT_PAYLOAD_FLAGS_1(NB)
151 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_GART_WALK \
152 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
153 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_RMW \
154 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
155 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_WDOG \
156 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
157 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_DRAMADDR_PAR \
158 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
159 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_MC_TESTFAIL \
160 	FM_EREPORT_PAYLOAD_FLAG_RESOURCE
161 
162 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_UNKNOWN \
163 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
164 
165 #define	FM_EREPORT_CPU_AMD_DC_INF_SYS_ECC1	"dc.inf_sys_ecc1"
166 #define	FM_EREPORT_CPU_AMD_DC_INF_SYS_ECCM	"dc.inf_sys_eccm"
167 #define	FM_EREPORT_CPU_AMD_DC_INF_L2_ECC1	"dc.inf_l2_ecc1"
168 #define	FM_EREPORT_CPU_AMD_DC_INF_L2_ECCM	"dc.inf_l2_eccm"
169 #define	FM_EREPORT_CPU_AMD_DC_DATA_ECC1		"dc.data_ecc1"
170 #define	FM_EREPORT_CPU_AMD_DC_DATA_ECC1_UC	"dc.data_ecc1_uc"
171 #define	FM_EREPORT_CPU_AMD_DC_DATA_ECCM		"dc.data_eccm"
172 #define	FM_EREPORT_CPU_AMD_DC_TAG_PAR		"dc.tag_par"
173 #define	FM_EREPORT_CPU_AMD_DC_STAG_PAR		"dc.stag_par"
174 #define	FM_EREPORT_CPU_AMD_DC_L1TLB_PAR		"dc.l1tlb_par"
175 #define	FM_EREPORT_CPU_AMD_DC_L2TLB_PAR		"dc.l2tlb_par"
176 
177 #define	FM_EREPORT_CPU_AMD_IC_INF_SYS_ECC1	"ic.inf_sys_ecc1"
178 #define	FM_EREPORT_CPU_AMD_IC_INF_SYS_ECCM	"ic.inf_sys_eccm"
179 #define	FM_EREPORT_CPU_AMD_IC_INF_L2_ECC1	"ic.inf_l2_ecc1"
180 #define	FM_EREPORT_CPU_AMD_IC_INF_L2_ECCM	"ic.inf_l2_eccm"
181 #define	FM_EREPORT_CPU_AMD_IC_DATA_PAR		"ic.data_par"
182 #define	FM_EREPORT_CPU_AMD_IC_TAG_PAR		"ic.tag_par"
183 #define	FM_EREPORT_CPU_AMD_IC_STAG_PAR		"ic.stag_par"
184 #define	FM_EREPORT_CPU_AMD_IC_L1TLB_PAR		"ic.l1tlb_par"
185 #define	FM_EREPORT_CPU_AMD_IC_L2TLB_PAR		"ic.l2tlb_par"
186 #define	FM_EREPORT_CPU_AMD_IC_RDDE		"ic.rdde"
187 
188 #define	FM_EREPORT_CPU_AMD_BU_L2D_ECC1		"bu.l2d_ecc1"
189 #define	FM_EREPORT_CPU_AMD_BU_L2D_ECCM		"bu.l2d_eccm"
190 #define	FM_EREPORT_CPU_AMD_BU_L2T_PAR		"bu.l2t_par"
191 #define	FM_EREPORT_CPU_AMD_BU_L2T_ECC1		"bu.l2t_ecc1"
192 #define	FM_EREPORT_CPU_AMD_BU_L2T_ECCM		"bu.l2t_eccm"
193 #define	FM_EREPORT_CPU_AMD_BU_S_RDE		"bu.s_rde"
194 #define	FM_EREPORT_CPU_AMD_BU_S_ECC1		"bu.s_ecc1"
195 #define	FM_EREPORT_CPU_AMD_BU_S_ECCM		"bu.s_eccm"
196 
197 #define	FM_EREPORT_CPU_AMD_LS_S_RDE		"ls.s_rde"
198 
199 #define	FM_EREPORT_CPU_AMD_NB_MEM_CE		"nb.mem_ce"
200 #define	FM_EREPORT_CPU_AMD_NB_MEM_UE		"nb.mem_ue"
201 #define	FM_EREPORT_CPU_AMD_NB_HT_CRC		"nb.ht_crc"
202 #define	FM_EREPORT_CPU_AMD_NB_HT_SYNC		"nb.ht_sync"
203 #define	FM_EREPORT_CPU_AMD_NB_MA		"nb.ma"
204 #define	FM_EREPORT_CPU_AMD_NB_TA		"nb.ta"
205 #define	FM_EREPORT_CPU_AMD_NB_GART_WALK		"nb.gart_walk"
206 #define	FM_EREPORT_CPU_AMD_NB_RMW		"nb.rmw"
207 #define	FM_EREPORT_CPU_AMD_NB_WDOG		"nb.wdog"
208 #define	FM_EREPORT_CPU_AMD_NB_DRAMADDR_PAR	"nb.dramaddr_par"
209 
210 #define	FM_EREPORT_CPU_AMD_MC_TESTFAIL		"mc.cs_testfail"
211 
212 #define	FM_EREPORT_CPU_AMD_UNKNOWN		"unknown"
213 
214 #ifdef __cplusplus
215 }
216 #endif
217 
218 #endif /* _SYS_FM_CPU_AMD_H */
219