xref: /titanic_52/usr/src/uts/intel/sys/fm/cpu/GENAMD.h (revision b9bd317cda1afb3a01f4812de73e8cec888cbbd7)
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_GENAMD_H
28 #define	_SYS_FM_CPU_GENAMD_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 /* Ereport class subcategory - same as in GMCA.h */
33 #define	FM_EREPORT_CPU_GENAMD	"generic-x86"
34 
35 /* Ereport leaf classes */
36 #define	FM_EREPORT_CPU_GENAMD_MEM_CE		"mem_ce"
37 #define	FM_EREPORT_CPU_GENAMD_MEM_UE		"mem_ue"
38 #define	FM_EREPORT_CPU_GENAMD_CKMEM_CE		"mem_ce"
39 #define	FM_EREPORT_CPU_GENAMD_CKMEM_UE		"mem_ue"
40 #define	FM_EREPORT_CPU_GENADM_GARTTBLWLK	"gart_tbl_walk"
41 
42 #define	_FM_EREPORT_FLAG(n) (1ULL << (n))
43 
44 #define	FM_EREPORT_GENAMD_PAYLOAD_NAME_SYND		"syndrome"
45 #define	FM_EREPORT_GENAMD_PAYLOAD_FLAG_SYND		_FM_EREPORT_FLAG(1)
46 
47 #define	FM_EREPORT_GENAMD_PAYLOAD_NAME_CKSYND		"syndrome"
48 #define	FM_EREPORT_GENAMD_PAYLOAD_FLAG_CKSYND		_FM_EREPORT_FLAG(2)
49 
50 #define	FM_EREPORT_GENAMD_PAYLOAD_NAME_SYNDTYPE		"syndrome-type"
51 #define	FM_EREPORT_GENAMD_PAYLOAD_FLAG_SYNDTYPE		_FM_EREPORT_FLAG(3)
52 
53 #define	FM_EREPORT_GENAMD_PAYLOAD_NAME_RESOURCE		"resource"
54 #define	FM_EREPORT_GENAMD_PAYLOAD_FLAG_RESOURCE		_FM_EREPORT_FLAG(4)
55 
56 #define	FM_EREPORT_GENAMD_PAYLOAD_NAME_RESOURCECNT	"resource_counts"
57 #define	FM_EREPORT_GENAMD_PAYLOAD_FLAG_RESOURCECNT	_FM_EREPORT_FLAG(5)
58 
59 #define	FM_EREPORT_GENAMD_PAYLOAD_FLAGS_MEM_CE \
60 	(FM_EREPORT_GENAMD_PAYLOAD_FLAG_SYND | \
61 	FM_EREPORT_GENAMD_PAYLOAD_FLAG_SYNDTYPE | \
62 	FM_EREPORT_GENAMD_PAYLOAD_FLAG_RESOURCE | \
63 	FM_EREPORT_GENAMD_PAYLOAD_FLAG_RESOURCECNT)
64 
65 #define	FM_EREPORT_GENAMD_PAYLOAD_FLAGS_MEM_UE \
66 	(FM_EREPORT_GENAMD_PAYLOAD_FLAG_SYND | \
67 	FM_EREPORT_GENAMD_PAYLOAD_FLAG_SYNDTYPE | \
68 	FM_EREPORT_GENAMD_PAYLOAD_FLAG_RESOURCE | \
69 	FM_EREPORT_GENAMD_PAYLOAD_FLAG_RESOURCECNT)
70 
71 #define	FM_EREPORT_GENAMD_PAYLOAD_FLAGS_CKMEM_CE \
72 	(FM_EREPORT_GENAMD_PAYLOAD_FLAG_CKSYND | \
73 	FM_EREPORT_GENAMD_PAYLOAD_FLAG_SYNDTYPE | \
74 	FM_EREPORT_GENAMD_PAYLOAD_FLAG_RESOURCE | \
75 	FM_EREPORT_GENAMD_PAYLOAD_FLAG_RESOURCECNT)
76 
77 #define	FM_EREPORT_GENAMD_PAYLOAD_FLAGS_CKMEM_UE \
78 	(FM_EREPORT_GENAMD_PAYLOAD_FLAG_CKSYND | \
79 	FM_EREPORT_GENAMD_PAYLOAD_FLAG_SYNDTYPE | \
80 	FM_EREPORT_GENAMD_PAYLOAD_FLAG_RESOURCE | \
81 	FM_EREPORT_GENAMD_PAYLOAD_FLAG_RESOURCECNT)
82 
83 #ifdef __cplusplus
84 extern "C" {
85 #endif
86 
87 #ifdef __cplusplus
88 }
89 #endif
90 
91 #endif /* _SYS_FM_CPU_GENAMD_H */
92