xref: /titanic_41/usr/src/uts/intel/sys/fm/cpu/AMD.h (revision 60405de4d8688d96dd05157c28db3ade5c9bc234)
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, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 
23 /*
24  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25  * Use is subject to license terms.
26  */
27 
28 #ifndef _SYS_FM_CPU_AMD_H
29 #define	_SYS_FM_CPU_AMD_H
30 
31 #pragma ident	"%Z%%M%	%I%	%E% SMI"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 /* Ereport class subcategory for AMD processors */
38 #define	FM_EREPORT_CPU_AMD	"amd"
39 
40 /*
41  * Ereport payload definitions
42  */
43 #define	FM_EREPORT_PAYLOAD_NAME_BANK_STAT	"bank-status"
44 #define	FM_EREPORT_PAYLOAD_NAME_BANK_NUM	"bank-number"
45 #define	FM_EREPORT_PAYLOAD_NAME_ADDR		"addr"
46 #define	FM_EREPORT_PAYLOAD_NAME_ADDR_VALID	"addr-valid"
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 
64 #define	FM_EREPORT_PAYLOAD_FLAGS_BANK \
65 	(FM_EREPORT_PAYLOAD_FLAG_BANK_STAT | FM_EREPORT_PAYLOAD_FLAG_BANK_NUM)
66 #define	FM_EREPORT_PAYLOAD_FLAGS_ADDR \
67 	(FM_EREPORT_PAYLOAD_FLAG_ADDR | FM_EREPORT_PAYLOAD_FLAG_ADDR_VALID)
68 #define	FM_EREPORT_PAYLOAD_FLAGS_SYND \
69 	(FM_EREPORT_PAYLOAD_FLAG_SYND | FM_EREPORT_PAYLOAD_FLAG_SYND_TYPE)
70 #define	FM_EREPORT_PAYLOAD_FLAGS_RESOURCE \
71 	(FM_EREPORT_PAYLOAD_FLAG_RESOURCE)
72 #define	FM_EREPORT_PAYLOAD_FLAGS_COMMON \
73 	(FM_EREPORT_PAYLOAD_FLAGS_BANK | FM_EREPORT_PAYLOAD_FLAG_IP | \
74 	FM_EREPORT_PAYLOAD_FLAG_PRIV)
75 #define	FM_EREPORT_PAYLOAD_FLAGS_NB \
76 	(FM_EREPORT_PAYLOAD_FLAG_STACK)
77 
78 #define	FM_EREPORT_PAYLOAD_FLAGS_1(f1) \
79 	(FM_EREPORT_PAYLOAD_FLAGS_COMMON | FM_EREPORT_PAYLOAD_FLAGS_##f1)
80 #define	FM_EREPORT_PAYLOAD_FLAGS_2(f1, f2) \
81 	(FM_EREPORT_PAYLOAD_FLAGS_COMMON | FM_EREPORT_PAYLOAD_FLAGS_##f1 | \
82 	FM_EREPORT_PAYLOAD_FLAGS_##f2)
83 #define	FM_EREPORT_PAYLOAD_FLAGS_3(f1, f2, f3) \
84 	(FM_EREPORT_PAYLOAD_FLAGS_COMMON | FM_EREPORT_PAYLOAD_FLAGS_##f1 | \
85 	FM_EREPORT_PAYLOAD_FLAGS_##f2 | FM_EREPORT_PAYLOAD_FLAGS_##f3)
86 
87 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_INF_SYS_ECC1 \
88 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, SYND)
89 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_INF_L2_ECC1 \
90 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, SYND)
91 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_INF_SYS_ECCM \
92 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, SYND)
93 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_INF_L2_ECCM \
94 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, SYND)
95 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_DATA_ECC1 \
96 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, SYND)
97 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_DATA_ECC1_UC \
98 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, SYND)
99 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_DATA_ECCM \
100 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, SYND)
101 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_TAG_PAR \
102 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
103 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_STAG_PAR \
104 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
105 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_L1TLB_PAR \
106 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
107 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_DC_L2TLB_PAR \
108 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
109 
110 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_INF_SYS_ECC1 \
111 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
112 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_INF_L2_ECC1 \
113 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
114 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_INF_SYS_ECCM \
115 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
116 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_INF_L2_ECCM \
117 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
118 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_DATA_PAR \
119 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
120 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_TAG_PAR \
121 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
122 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_STAG_PAR \
123 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
124 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_L1TLB_PAR \
125 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
126 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_L2TLB_PAR \
127 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
128 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_IC_RDDE \
129 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
130 
131 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_L2D_ECC1 \
132 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, SYND)
133 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_L2D_ECCM \
134 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, SYND)
135 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_L2T_PAR \
136 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
137 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_L2T_ECC1 \
138 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, SYND)
139 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_L2T_ECCM \
140 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, SYND)
141 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_S_RDE \
142 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
143 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_S_ECC1 \
144 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, SYND)
145 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_BU_S_ECCM \
146 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, SYND)
147 
148 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_LS_S_RDE \
149 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
150 
151 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_MEM_CE \
152 	FM_EREPORT_PAYLOAD_FLAGS_3(ADDR, SYND, RESOURCE)
153 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_MEM_UE \
154 	FM_EREPORT_PAYLOAD_FLAGS_3(ADDR, SYND, RESOURCE)
155 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_HT_CRC \
156 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
157 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_HT_SYNC \
158 	FM_EREPORT_PAYLOAD_FLAGS_COMMON
159 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_MA \
160 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, NB)
161 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_TA \
162 	FM_EREPORT_PAYLOAD_FLAGS_2(ADDR, NB)
163 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_GART_WALK \
164 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
165 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_RMW \
166 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
167 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_NB_WDOG \
168 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
169 
170 #define	FM_EREPORT_PAYLOAD_FLAGS_CPU_AMD_UNKNOWN \
171 	FM_EREPORT_PAYLOAD_FLAGS_1(ADDR)
172 
173 #define	FM_EREPORT_CPU_AMD_DC_INF_SYS_ECC1	"dc.inf_sys_ecc1"
174 #define	FM_EREPORT_CPU_AMD_DC_INF_SYS_ECCM	"dc.inf_sys_eccm"
175 #define	FM_EREPORT_CPU_AMD_DC_INF_L2_ECC1	"dc.inf_l2_ecc1"
176 #define	FM_EREPORT_CPU_AMD_DC_INF_L2_ECCM	"dc.inf_l2_eccm"
177 #define	FM_EREPORT_CPU_AMD_DC_DATA_ECC1		"dc.data_ecc1"
178 #define	FM_EREPORT_CPU_AMD_DC_DATA_ECC1_UC	"dc.data_ecc1_uc"
179 #define	FM_EREPORT_CPU_AMD_DC_DATA_ECCM		"dc.data_eccm"
180 #define	FM_EREPORT_CPU_AMD_DC_TAG_PAR		"dc.tag_par"
181 #define	FM_EREPORT_CPU_AMD_DC_STAG_PAR		"dc.stag_par"
182 #define	FM_EREPORT_CPU_AMD_DC_L1TLB_PAR		"dc.l1tlb_par"
183 #define	FM_EREPORT_CPU_AMD_DC_L2TLB_PAR		"dc.l2tlb_par"
184 
185 #define	FM_EREPORT_CPU_AMD_IC_INF_SYS_ECC1	"ic.inf_sys_ecc1"
186 #define	FM_EREPORT_CPU_AMD_IC_INF_SYS_ECCM	"ic.inf_sys_eccm"
187 #define	FM_EREPORT_CPU_AMD_IC_INF_L2_ECC1	"ic.inf_l2_ecc1"
188 #define	FM_EREPORT_CPU_AMD_IC_INF_L2_ECCM	"ic.inf_l2_eccm"
189 #define	FM_EREPORT_CPU_AMD_IC_DATA_PAR		"ic.data_par"
190 #define	FM_EREPORT_CPU_AMD_IC_TAG_PAR		"ic.tag_par"
191 #define	FM_EREPORT_CPU_AMD_IC_STAG_PAR		"ic.stag_par"
192 #define	FM_EREPORT_CPU_AMD_IC_L1TLB_PAR		"ic.l1tlb_par"
193 #define	FM_EREPORT_CPU_AMD_IC_L2TLB_PAR		"ic.l2tlb_par"
194 #define	FM_EREPORT_CPU_AMD_IC_RDDE		"ic.rdde"
195 
196 #define	FM_EREPORT_CPU_AMD_BU_L2D_ECC1		"bu.l2d_ecc1"
197 #define	FM_EREPORT_CPU_AMD_BU_L2D_ECCM		"bu.l2d_eccm"
198 #define	FM_EREPORT_CPU_AMD_BU_L2T_PAR		"bu.l2t_par"
199 #define	FM_EREPORT_CPU_AMD_BU_L2T_ECC1		"bu.l2t_ecc1"
200 #define	FM_EREPORT_CPU_AMD_BU_L2T_ECCM		"bu.l2t_eccm"
201 #define	FM_EREPORT_CPU_AMD_BU_S_RDE		"bu.s_rde"
202 #define	FM_EREPORT_CPU_AMD_BU_S_ECC1		"bu.s_ecc1"
203 #define	FM_EREPORT_CPU_AMD_BU_S_ECCM		"bu.s_eccm"
204 
205 #define	FM_EREPORT_CPU_AMD_LS_S_RDE		"ls.s_rde"
206 
207 #define	FM_EREPORT_CPU_AMD_NB_MEM_CE		"nb.mem_ce"
208 #define	FM_EREPORT_CPU_AMD_NB_MEM_UE		"nb.mem_ue"
209 #define	FM_EREPORT_CPU_AMD_NB_HT_CRC		"nb.ht_crc"
210 #define	FM_EREPORT_CPU_AMD_NB_HT_SYNC		"nb.ht_sync"
211 #define	FM_EREPORT_CPU_AMD_NB_MA		"nb.ma"
212 #define	FM_EREPORT_CPU_AMD_NB_TA		"nb.ta"
213 #define	FM_EREPORT_CPU_AMD_NB_GART_WALK		"nb.gart_walk"
214 #define	FM_EREPORT_CPU_AMD_NB_RMW		"nb.rmw"
215 #define	FM_EREPORT_CPU_AMD_NB_WDOG		"nb.wdog"
216 
217 #define	FM_EREPORT_CPU_AMD_UNKNOWN		"unknown"
218 
219 #ifdef __cplusplus
220 }
221 #endif
222 
223 #endif /* _SYS_FM_CPU_AMD_H */
224