xref: /titanic_44/usr/src/uts/intel/sys/fm/cpu/AMD.h (revision 40e5e17b3361b3eea56a9723071c406894a20b78)
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 2006 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 /* Ereport class subcategory for AMD processors */
37 #define	FM_EREPORT_CPU_AMD	"amd"
38 
39 /*
40  * Ereport payload definitions
41  */
42 #define	FM_EREPORT_PAYLOAD_NAME_BANK_STAT	"bank-status"
43 #define	FM_EREPORT_PAYLOAD_NAME_BANK_NUM	"bank-number"
44 #define	FM_EREPORT_PAYLOAD_NAME_ADDR		"addr"
45 #define	FM_EREPORT_PAYLOAD_NAME_ADDR_VALID	"addr-valid"
46 #define	FM_EREPORT_PAYLOAD_NAME_BANK_MISC	"bank-misc"
47 #define	FM_EREPORT_PAYLOAD_NAME_SYND		"syndrome"
48 #define	FM_EREPORT_PAYLOAD_NAME_SYND_TYPE	"syndrome-type"
49 #define	FM_EREPORT_PAYLOAD_NAME_IP		"ip"
50 #define	FM_EREPORT_PAYLOAD_NAME_PRIV		"privileged"
51 #define	FM_EREPORT_PAYLOAD_NAME_RESOURCE	"resource"
52 
53 #define	FM_EREPORT_PAYLOAD_FLAG_BANK_STAT	0x0000000000000001
54 #define	FM_EREPORT_PAYLOAD_FLAG_BANK_NUM	0x0000000000000002
55 #define	FM_EREPORT_PAYLOAD_FLAG_ADDR		0x0000000000000004
56 #define	FM_EREPORT_PAYLOAD_FLAG_ADDR_VALID	0x0000000000000008
57 #define	FM_EREPORT_PAYLOAD_FLAG_SYND		0x0000000000000010
58 #define	FM_EREPORT_PAYLOAD_FLAG_SYND_TYPE	0x0000000000000020
59 #define	FM_EREPORT_PAYLOAD_FLAG_IP		0x0000000000000040
60 #define	FM_EREPORT_PAYLOAD_FLAG_PRIV		0x0000000000000080
61 #define	FM_EREPORT_PAYLOAD_FLAG_RESOURCE	0x0000000000000100
62 #define	FM_EREPORT_PAYLOAD_FLAG_STACK		0x0000000000000200
63 #define	FM_EREPORT_PAYLOAD_FLAG_BANK_MISC	0x0000000000000400
64 
65 #define	FM_EREPORT_PAYLOAD_FLAGS_BANK \
66 	(FM_EREPORT_PAYLOAD_FLAG_BANK_STAT | FM_EREPORT_PAYLOAD_FLAG_BANK_NUM)
67 #define	FM_EREPORT_PAYLOAD_FLAGS_ADDR \
68 	(FM_EREPORT_PAYLOAD_FLAG_ADDR | FM_EREPORT_PAYLOAD_FLAG_ADDR_VALID)
69 #define	FM_EREPORT_PAYLOAD_FLAGS_SYND \
70 	(FM_EREPORT_PAYLOAD_FLAG_SYND | FM_EREPORT_PAYLOAD_FLAG_SYND_TYPE)
71 #define	FM_EREPORT_PAYLOAD_FLAGS_RESOURCE \
72 	(FM_EREPORT_PAYLOAD_FLAG_RESOURCE)
73 #define	FM_EREPORT_PAYLOAD_FLAGS_COMMON \
74 	(FM_EREPORT_PAYLOAD_FLAGS_BANK | FM_EREPORT_PAYLOAD_FLAG_IP | \
75 	FM_EREPORT_PAYLOAD_FLAG_PRIV)
76 #define	FM_EREPORT_PAYLOAD_FLAGS_NB \
77 	(FM_EREPORT_PAYLOAD_FLAG_STACK)
78 #define	FM_EREPORT_PAYLOAD_FLAGS_BANK_MISC \
79 	(FM_EREPORT_PAYLOAD_FLAG_BANK_MISC)
80 
81 #define	FM_EREPORT_PAYLOAD_FLAGS_1(f1) \
82 	(FM_EREPORT_PAYLOAD_FLAGS_COMMON | FM_EREPORT_PAYLOAD_FLAGS_##f1)
83 #define	FM_EREPORT_PAYLOAD_FLAGS_2(f1, f2) \
84 	(FM_EREPORT_PAYLOAD_FLAGS_COMMON | FM_EREPORT_PAYLOAD_FLAGS_##f1 | \
85 	FM_EREPORT_PAYLOAD_FLAGS_##f2)
86 #define	FM_EREPORT_PAYLOAD_FLAGS_3(f1, f2, f3) \
87 	(FM_EREPORT_PAYLOAD_FLAGS_COMMON | FM_EREPORT_PAYLOAD_FLAGS_##f1 | \
88 	FM_EREPORT_PAYLOAD_FLAGS_##f2 | FM_EREPORT_PAYLOAD_FLAGS_##f3)
89 #define	FM_EREPORT_PAYLOAD_FLAGS_4(f1, f2, f3, f4) \
90 	(FM_EREPORT_PAYLOAD_FLAGS_COMMON | FM_EREPORT_PAYLOAD_FLAGS_##f1 | \
91 	FM_EREPORT_PAYLOAD_FLAGS_##f2 | FM_EREPORT_PAYLOAD_FLAGS_##f3 | \
92 	FM_EREPORT_PAYLOAD_FLAGS_##f4)
93 
94 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_INF_SYS_ECC1 \
95 	FM_EREPORT_PAYLOAD_FLAGS_3(ADDR, SYND, RESOURCE)
96 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_INF_L2_ECC1 \
97 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, SYND)
98 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_INF_SYS_ECCM \
99 	FM_EREPORT_PAYLOAD_FLAGS_3(ADDR, SYND, RESOURCE)
100 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_INF_L2_ECCM \
101 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, SYND)
102 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_DATA_ECC1 \
103 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, SYND)
104 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_DATA_ECC1_UC \
105 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, SYND)
106 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_DATA_ECCM \
107 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, SYND)
108 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_TAG_PAR \
109 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
110 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_STAG_PAR \
111 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
112 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_L1TLB_PAR \
113 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
114 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_L2TLB_PAR \
115 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
116 
117 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_INF_SYS_ECC1 \
118 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
119 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_INF_L2_ECC1 \
120 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
121 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_INF_SYS_ECCM \
122 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
123 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_INF_L2_ECCM \
124 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
125 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_DATA_PAR \
126 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
127 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_TAG_PAR \
128 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
129 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_STAG_PAR \
130 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
131 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_L1TLB_PAR \
132 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
133 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_L2TLB_PAR \
134 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
135 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_RDDE \
136 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
137 
138 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_L2D_ECC1 \
139 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, SYND)
140 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_L2D_ECCM \
141 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, SYND)
142 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_L2T_PAR \
143 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
144 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_L2T_ECC1 \
145 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, SYND)
146 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_L2T_ECCM \
147 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, SYND)
148 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_S_RDE \
149 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
150 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_S_ECC1 \
151 	FM_EREPORT_PAYLOAD_FLAGS_3(ADDR, SYND, RESOURCE)
152 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_S_ECCM \
153 	FM_EREPORT_PAYLOAD_FLAGS_3(ADDR, SYND, RESOURCE)
154 
155 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_LS_S_RDE \
156 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
157 
158 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_MEM_CE \
159 	FM_EREPORT_PAYLOAD_FLAGS_4(ADDR, SYND, RESOURCE, BANK_MISC)
160 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_MEM_UE \
161 	FM_EREPORT_PAYLOAD_FLAGS_4(ADDR, SYND, RESOURCE, BANK_MISC)
162 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_HT_CRC \
163 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
164 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_HT_SYNC \
165 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
166 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_MA \
167 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, NB)
168 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_TA \
169 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, NB)
170 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_GART_WALK \
171 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
172 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_RMW \
173 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
174 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_WDOG \
175 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
176 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_DRAMADDR_PAR \
177 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
178 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_MC_TESTFAIL \
179 	FM_EREPORT_PAYLOAD_FLAG_RESOURCE
180 
181 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_UNKNOWN \
182 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
183 
184 #define	FM_EREPORT_CPU_AMD_DC_INF_SYS_ECC1	"dc.inf_sys_ecc1"
185 #define	FM_EREPORT_CPU_AMD_DC_INF_SYS_ECCM	"dc.inf_sys_eccm"
186 #define	FM_EREPORT_CPU_AMD_DC_INF_L2_ECC1	"dc.inf_l2_ecc1"
187 #define	FM_EREPORT_CPU_AMD_DC_INF_L2_ECCM	"dc.inf_l2_eccm"
188 #define	FM_EREPORT_CPU_AMD_DC_DATA_ECC1		"dc.data_ecc1"
189 #define	FM_EREPORT_CPU_AMD_DC_DATA_ECC1_UC	"dc.data_ecc1_uc"
190 #define	FM_EREPORT_CPU_AMD_DC_DATA_ECCM		"dc.data_eccm"
191 #define	FM_EREPORT_CPU_AMD_DC_TAG_PAR		"dc.tag_par"
192 #define	FM_EREPORT_CPU_AMD_DC_STAG_PAR		"dc.stag_par"
193 #define	FM_EREPORT_CPU_AMD_DC_L1TLB_PAR		"dc.l1tlb_par"
194 #define	FM_EREPORT_CPU_AMD_DC_L2TLB_PAR		"dc.l2tlb_par"
195 
196 #define	FM_EREPORT_CPU_AMD_IC_INF_SYS_ECC1	"ic.inf_sys_ecc1"
197 #define	FM_EREPORT_CPU_AMD_IC_INF_SYS_ECCM	"ic.inf_sys_eccm"
198 #define	FM_EREPORT_CPU_AMD_IC_INF_L2_ECC1	"ic.inf_l2_ecc1"
199 #define	FM_EREPORT_CPU_AMD_IC_INF_L2_ECCM	"ic.inf_l2_eccm"
200 #define	FM_EREPORT_CPU_AMD_IC_DATA_PAR		"ic.data_par"
201 #define	FM_EREPORT_CPU_AMD_IC_TAG_PAR		"ic.tag_par"
202 #define	FM_EREPORT_CPU_AMD_IC_STAG_PAR		"ic.stag_par"
203 #define	FM_EREPORT_CPU_AMD_IC_L1TLB_PAR		"ic.l1tlb_par"
204 #define	FM_EREPORT_CPU_AMD_IC_L2TLB_PAR		"ic.l2tlb_par"
205 #define	FM_EREPORT_CPU_AMD_IC_RDDE		"ic.rdde"
206 
207 #define	FM_EREPORT_CPU_AMD_BU_L2D_ECC1		"bu.l2d_ecc1"
208 #define	FM_EREPORT_CPU_AMD_BU_L2D_ECCM		"bu.l2d_eccm"
209 #define	FM_EREPORT_CPU_AMD_BU_L2T_PAR		"bu.l2t_par"
210 #define	FM_EREPORT_CPU_AMD_BU_L2T_ECC1		"bu.l2t_ecc1"
211 #define	FM_EREPORT_CPU_AMD_BU_L2T_ECCM		"bu.l2t_eccm"
212 #define	FM_EREPORT_CPU_AMD_BU_S_RDE		"bu.s_rde"
213 #define	FM_EREPORT_CPU_AMD_BU_S_ECC1		"bu.s_ecc1"
214 #define	FM_EREPORT_CPU_AMD_BU_S_ECCM		"bu.s_eccm"
215 
216 #define	FM_EREPORT_CPU_AMD_LS_S_RDE		"ls.s_rde"
217 
218 #define	FM_EREPORT_CPU_AMD_NB_MEM_CE		"nb.mem_ce"
219 #define	FM_EREPORT_CPU_AMD_NB_MEM_UE		"nb.mem_ue"
220 #define	FM_EREPORT_CPU_AMD_NB_HT_CRC		"nb.ht_crc"
221 #define	FM_EREPORT_CPU_AMD_NB_HT_SYNC		"nb.ht_sync"
222 #define	FM_EREPORT_CPU_AMD_NB_MA		"nb.ma"
223 #define	FM_EREPORT_CPU_AMD_NB_TA		"nb.ta"
224 #define	FM_EREPORT_CPU_AMD_NB_GART_WALK		"nb.gart_walk"
225 #define	FM_EREPORT_CPU_AMD_NB_RMW		"nb.rmw"
226 #define	FM_EREPORT_CPU_AMD_NB_WDOG		"nb.wdog"
227 #define	FM_EREPORT_CPU_AMD_NB_DRAMADDR_PAR	"nb.dramaddr_par"
228 
229 #define	FM_EREPORT_CPU_AMD_MC_TESTFAIL		"mc.cs_testfail"
230 
231 #define	FM_EREPORT_CPU_AMD_UNKNOWN		"unknown"
232 
233 #ifdef __cplusplus
234 }
235 #endif
236 
237 #endif /* _SYS_FM_CPU_AMD_H */
238