1 /* * MCA quirks
2  * Copyright (c) 2009 Advanced Micro Devices, Inc.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef _MCE_QUIRK_H
19 #define _MCE_QUIRK_H
20 
21 #include <xen/types.h>
22 
23 struct mce_quirkdata {
24 	int32_t cpu_family;
25 	int16_t cpu_model;
26 	int16_t cpu_stepping;
27 	uint32_t quirk;
28 };
29 
30 /* use a binary flag if multiple quirks apply
31  * to one CPU family/model
32  */
33 
34 enum mcequirk_amd_flags {
35 	MCEQUIRK_K8_GART = 2,
36 	MCEQUIRK_F10_GART
37 };
38 
39 enum mcequirk_intel_flags {
40 	MCEQUIRK_DUMMY = 0x1, /* nothing known yet */
41 };
42 
43 enum mcequirk_amd_flags
44 mcequirk_lookup_amd_quirkdata(struct cpuinfo_x86 *c);
45 
46 int mcequirk_amd_apply(enum mcequirk_amd_flags flags);
47 
48 enum mcequirk_intel_flags
49 mcequirk_lookup_intel_quirkdata(struct cpuinfo_x86 *c);
50 
51 int mcequirk_intel_apply(enum mcequirk_intel_flags flags);
52 
53 #endif /* _MCE_QUIRK_H */
54