ia64/xen-unstable

view xen/arch/x86/cpu/amd.h @ 19835:edfdeb150f27

Fix buildsystem to detect udev > version 124

udev removed the udevinfo symlink from versions higher than 123 and
xen's build-system could not detect if udev is in place and has the
required version.

Signed-off-by: Marc-A. Dahlhaus <mad@wol.de>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jun 25 13:02:37 2009 +0100 (2009-06-25)
parents 10e0e90831f0
children
line source
1 /*
2 * amd.h - AMD processor specific definitions
3 */
5 #ifndef __AMD_H__
6 #define __AMD_H__
8 #include <asm/cpufeature.h>
10 /* CPUID masked for use by AMD-V Extended Migration */
12 #define X86_FEATURE_BITPOS(_feature_) ((_feature_) % 32)
13 #define __bit(_x_) (1U << X86_FEATURE_BITPOS(_x_))
15 /* Family 0Fh, Revision C */
16 #define AMD_FEATURES_K8_REV_C_ECX 0
17 #define AMD_FEATURES_K8_REV_C_EDX ( \
18 __bit(X86_FEATURE_FPU) | __bit(X86_FEATURE_VME) | \
19 __bit(X86_FEATURE_DE) | __bit(X86_FEATURE_PSE) | \
20 __bit(X86_FEATURE_TSC) | __bit(X86_FEATURE_MSR) | \
21 __bit(X86_FEATURE_PAE) | __bit(X86_FEATURE_MCE) | \
22 __bit(X86_FEATURE_CX8) | __bit(X86_FEATURE_APIC) | \
23 __bit(X86_FEATURE_SEP) | __bit(X86_FEATURE_MTRR) | \
24 __bit(X86_FEATURE_PGE) | __bit(X86_FEATURE_MCA) | \
25 __bit(X86_FEATURE_CMOV) | __bit(X86_FEATURE_PAT) | \
26 __bit(X86_FEATURE_PSE36) | __bit(X86_FEATURE_CLFLSH)| \
27 __bit(X86_FEATURE_MMX) | __bit(X86_FEATURE_FXSR) | \
28 __bit(X86_FEATURE_XMM) | __bit(X86_FEATURE_XMM2))
29 #define AMD_EXTFEATURES_K8_REV_C_ECX 0
30 #define AMD_EXTFEATURES_K8_REV_C_EDX ( \
31 __bit(X86_FEATURE_FPU) | __bit(X86_FEATURE_VME) | \
32 __bit(X86_FEATURE_DE) | __bit(X86_FEATURE_PSE) | \
33 __bit(X86_FEATURE_TSC) | __bit(X86_FEATURE_MSR) | \
34 __bit(X86_FEATURE_PAE) | __bit(X86_FEATURE_MCE) | \
35 __bit(X86_FEATURE_CX8) | __bit(X86_FEATURE_APIC) | \
36 __bit(X86_FEATURE_SYSCALL) | __bit(X86_FEATURE_MTRR) | \
37 __bit(X86_FEATURE_PGE) | __bit(X86_FEATURE_MCA) | \
38 __bit(X86_FEATURE_CMOV) | __bit(X86_FEATURE_PAT) | \
39 __bit(X86_FEATURE_PSE36) | __bit(X86_FEATURE_NX) | \
40 __bit(X86_FEATURE_MMXEXT) | __bit(X86_FEATURE_MMX) | \
41 __bit(X86_FEATURE_FXSR) | __bit(X86_FEATURE_LM) | \
42 __bit(X86_FEATURE_3DNOWEXT) | __bit(X86_FEATURE_3DNOW))
44 /* Family 0Fh, Revision D */
45 #define AMD_FEATURES_K8_REV_D_ECX AMD_FEATURES_K8_REV_C_ECX
46 #define AMD_FEATURES_K8_REV_D_EDX AMD_FEATURES_K8_REV_C_EDX
47 #define AMD_EXTFEATURES_K8_REV_D_ECX (AMD_EXTFEATURES_K8_REV_C_ECX |\
48 __bit(X86_FEATURE_LAHF_LM))
49 #define AMD_EXTFEATURES_K8_REV_D_EDX (AMD_EXTFEATURES_K8_REV_C_EDX |\
50 __bit(X86_FEATURE_FFXSR))
52 /* Family 0Fh, Revision E */
53 #define AMD_FEATURES_K8_REV_E_ECX (AMD_FEATURES_K8_REV_D_ECX | \
54 __bit(X86_FEATURE_XMM3))
55 #define AMD_FEATURES_K8_REV_E_EDX (AMD_FEATURES_K8_REV_D_EDX | \
56 __bit(X86_FEATURE_HT))
57 #define AMD_EXTFEATURES_K8_REV_E_ECX (AMD_EXTFEATURES_K8_REV_D_ECX |\
58 __bit(X86_FEATURE_CMP_LEGACY))
59 #define AMD_EXTFEATURES_K8_REV_E_EDX AMD_EXTFEATURES_K8_REV_D_EDX
61 /* Family 0Fh, Revision F */
62 #define AMD_FEATURES_K8_REV_F_ECX (AMD_FEATURES_K8_REV_E_ECX | \
63 __bit(X86_FEATURE_CX16))
64 #define AMD_FEATURES_K8_REV_F_EDX AMD_FEATURES_K8_REV_E_EDX
65 #define AMD_EXTFEATURES_K8_REV_F_ECX (AMD_EXTFEATURES_K8_REV_E_ECX |\
66 __bit(X86_FEATURE_SVME) | __bit(X86_FEATURE_EXTAPICSPACE) | \
67 __bit(X86_FEATURE_ALTMOVCR))
68 #define AMD_EXTFEATURES_K8_REV_F_EDX (AMD_EXTFEATURES_K8_REV_E_EDX |\
69 __bit(X86_FEATURE_RDTSCP))
71 /* Family 0Fh, Revision G */
72 #define AMD_FEATURES_K8_REV_G_ECX AMD_FEATURES_K8_REV_F_ECX
73 #define AMD_FEATURES_K8_REV_G_EDX AMD_FEATURES_K8_REV_F_EDX
74 #define AMD_EXTFEATURES_K8_REV_G_ECX (AMD_EXTFEATURES_K8_REV_F_ECX |\
75 __bit(X86_FEATURE_3DNOWPF))
76 #define AMD_EXTFEATURES_K8_REV_G_EDX AMD_EXTFEATURES_K8_REV_F_EDX
78 /* Family 10h, Revision B */
79 #define AMD_FEATURES_FAM10h_REV_B_ECX (AMD_FEATURES_K8_REV_F_ECX | \
80 __bit(X86_FEATURE_POPCNT) | __bit(X86_FEATURE_MWAIT))
81 #define AMD_FEATURES_FAM10h_REV_B_EDX AMD_FEATURES_K8_REV_F_EDX
82 #define AMD_EXTFEATURES_FAM10h_REV_B_ECX (AMD_EXTFEATURES_K8_REV_F_ECX |\
83 __bit(X86_FEATURE_ABM) | __bit(X86_FEATURE_SSE4A) | \
84 __bit(X86_FEATURE_MISALIGNSSE) | __bit(X86_FEATURE_OSVW) | \
85 __bit(X86_FEATURE_IBS))
86 #define AMD_EXTFEATURES_FAM10h_REV_B_EDX (AMD_EXTFEATURES_K8_REV_F_EDX |\
87 __bit(X86_FEATURE_PAGE1GB))
89 /* Family 10h, Revision C */
90 #define AMD_FEATURES_FAM10h_REV_C_ECX AMD_FEATURES_FAM10h_REV_B_ECX
91 #define AMD_FEATURES_FAM10h_REV_C_EDX AMD_FEATURES_FAM10h_REV_B_EDX
92 #define AMD_EXTFEATURES_FAM10h_REV_C_ECX (AMD_EXTFEATURES_FAM10h_REV_B_ECX |\
93 __bit(X86_FEATURE_SKINIT) | __bit(X86_FEATURE_WDT))
94 #define AMD_EXTFEATURES_FAM10h_REV_C_EDX AMD_EXTFEATURES_FAM10h_REV_B_EDX
96 /* Family 11h, Revision B */
97 #define AMD_FEATURES_FAM11h_REV_B_ECX AMD_FEATURES_K8_REV_G_ECX
98 #define AMD_FEATURES_FAM11h_REV_B_EDX AMD_FEATURES_K8_REV_G_EDX
99 #define AMD_EXTFEATURES_FAM11h_REV_B_ECX (AMD_EXTFEATURES_K8_REV_G_ECX |\
100 __bit(X86_FEATURE_SKINIT))
101 #define AMD_EXTFEATURES_FAM11h_REV_B_EDX AMD_EXTFEATURES_K8_REV_G_EDX
103 #endif /* __AMD_H__ */