• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ****************************************************************************
11  ****************************************************************************/
12 #ifndef __ASM_I386_CPUFEATURE_H
13 #define __ASM_I386_CPUFEATURE_H
14 
15 #ifndef __ASSEMBLY__
16 #include <linux/bitops.h>
17 #endif
18 #include <asm/required-features.h>
19 
20 #define NCAPINTS 8
21 
22 #define X86_FEATURE_FPU (0*32+ 0)
23 #define X86_FEATURE_VME (0*32+ 1)
24 #define X86_FEATURE_DE (0*32+ 2)
25 #define X86_FEATURE_PSE (0*32+ 3)
26 #define X86_FEATURE_TSC (0*32+ 4)
27 #define X86_FEATURE_MSR (0*32+ 5)
28 #define X86_FEATURE_PAE (0*32+ 6)
29 #define X86_FEATURE_MCE (0*32+ 7)
30 #define X86_FEATURE_CX8 (0*32+ 8)
31 #define X86_FEATURE_APIC (0*32+ 9)
32 #define X86_FEATURE_SEP (0*32+11)
33 #define X86_FEATURE_MTRR (0*32+12)
34 #define X86_FEATURE_PGE (0*32+13)
35 #define X86_FEATURE_MCA (0*32+14)
36 #define X86_FEATURE_CMOV (0*32+15)
37 #define X86_FEATURE_PAT (0*32+16)
38 #define X86_FEATURE_PSE36 (0*32+17)
39 #define X86_FEATURE_PN (0*32+18)
40 #define X86_FEATURE_CLFLSH (0*32+19)
41 #define X86_FEATURE_DS (0*32+21)
42 #define X86_FEATURE_ACPI (0*32+22)
43 #define X86_FEATURE_MMX (0*32+23)
44 #define X86_FEATURE_FXSR (0*32+24)
45 
46 #define X86_FEATURE_XMM (0*32+25)
47 #define X86_FEATURE_XMM2 (0*32+26)
48 #define X86_FEATURE_SELFSNOOP (0*32+27)
49 #define X86_FEATURE_HT (0*32+28)
50 #define X86_FEATURE_ACC (0*32+29)
51 #define X86_FEATURE_IA64 (0*32+30)
52 
53 #define X86_FEATURE_SYSCALL (1*32+11)
54 #define X86_FEATURE_MP (1*32+19)
55 #define X86_FEATURE_NX (1*32+20)
56 #define X86_FEATURE_MMXEXT (1*32+22)
57 #define X86_FEATURE_RDTSCP (1*32+27)
58 #define X86_FEATURE_LM (1*32+29)
59 #define X86_FEATURE_3DNOWEXT (1*32+30)
60 #define X86_FEATURE_3DNOW (1*32+31)
61 
62 #define X86_FEATURE_RECOVERY (2*32+ 0)
63 #define X86_FEATURE_LONGRUN (2*32+ 1)
64 #define X86_FEATURE_LRTI (2*32+ 3)
65 
66 #define X86_FEATURE_CXMMX (3*32+ 0)
67 #define X86_FEATURE_K6_MTRR (3*32+ 1)
68 #define X86_FEATURE_CYRIX_ARR (3*32+ 2)
69 #define X86_FEATURE_CENTAUR_MCR (3*32+ 3)
70 
71 #define X86_FEATURE_K8 (3*32+ 4)
72 #define X86_FEATURE_K7 (3*32+ 5)
73 #define X86_FEATURE_P3 (3*32+ 6)
74 #define X86_FEATURE_P4 (3*32+ 7)
75 #define X86_FEATURE_CONSTANT_TSC (3*32+ 8)
76 #define X86_FEATURE_UP (3*32+ 9)
77 #define X86_FEATURE_FXSAVE_LEAK (3*32+10)
78 #define X86_FEATURE_ARCH_PERFMON (3*32+11)
79 #define X86_FEATURE_PEBS (3*32+12)
80 #define X86_FEATURE_BTS (3*32+13)
81 
82 #define X86_FEATURE_SYNC_RDTSC (3*32+15)
83 #define X86_FEATURE_REP_GOOD (3*32+16)
84 
85 #define X86_FEATURE_XMM3 (4*32+ 0)
86 #define X86_FEATURE_MWAIT (4*32+ 3)
87 #define X86_FEATURE_DSCPL (4*32+ 4)
88 #define X86_FEATURE_EST (4*32+ 7)
89 #define X86_FEATURE_TM2 (4*32+ 8)
90 #define X86_FEATURE_CID (4*32+10)
91 #define X86_FEATURE_CX16 (4*32+13)
92 #define X86_FEATURE_XTPR (4*32+14)
93 #define X86_FEATURE_DCA (4*32+18)
94 
95 #define X86_FEATURE_XSTORE (5*32+ 2)
96 #define X86_FEATURE_XSTORE_EN (5*32+ 3)
97 #define X86_FEATURE_XCRYPT (5*32+ 6)
98 #define X86_FEATURE_XCRYPT_EN (5*32+ 7)
99 #define X86_FEATURE_ACE2 (5*32+ 8)
100 #define X86_FEATURE_ACE2_EN (5*32+ 9)
101 #define X86_FEATURE_PHE (5*32+ 10)
102 #define X86_FEATURE_PHE_EN (5*32+ 11)
103 #define X86_FEATURE_PMM (5*32+ 12)
104 #define X86_FEATURE_PMM_EN (5*32+ 13)
105 
106 #define X86_FEATURE_LAHF_LM (6*32+ 0)
107 #define X86_FEATURE_CMP_LEGACY (6*32+ 1)
108 
109 #define X86_FEATURE_IDA (7*32+ 0)
110 
111 #define cpu_has(c, bit)   (__builtin_constant_p(bit) &&   ( (((bit)>>5)==0 && (1UL<<((bit)&31) & REQUIRED_MASK0)) ||   (((bit)>>5)==1 && (1UL<<((bit)&31) & REQUIRED_MASK1)) ||   (((bit)>>5)==2 && (1UL<<((bit)&31) & REQUIRED_MASK2)) ||   (((bit)>>5)==3 && (1UL<<((bit)&31) & REQUIRED_MASK3)) ||   (((bit)>>5)==4 && (1UL<<((bit)&31) & REQUIRED_MASK4)) ||   (((bit)>>5)==5 && (1UL<<((bit)&31) & REQUIRED_MASK5)) ||   (((bit)>>5)==6 && (1UL<<((bit)&31) & REQUIRED_MASK6)) ||   (((bit)>>5)==7 && (1UL<<((bit)&31) & REQUIRED_MASK7)) )   ? 1 :   test_bit(bit, (c)->x86_capability))
112 #define boot_cpu_has(bit) cpu_has(&boot_cpu_data, bit)
113 
114 #define cpu_has_fpu boot_cpu_has(X86_FEATURE_FPU)
115 #define cpu_has_vme boot_cpu_has(X86_FEATURE_VME)
116 #define cpu_has_de boot_cpu_has(X86_FEATURE_DE)
117 #define cpu_has_pse boot_cpu_has(X86_FEATURE_PSE)
118 #define cpu_has_tsc boot_cpu_has(X86_FEATURE_TSC)
119 #define cpu_has_pae boot_cpu_has(X86_FEATURE_PAE)
120 #define cpu_has_pge boot_cpu_has(X86_FEATURE_PGE)
121 #define cpu_has_apic boot_cpu_has(X86_FEATURE_APIC)
122 #define cpu_has_sep boot_cpu_has(X86_FEATURE_SEP)
123 #define cpu_has_mtrr boot_cpu_has(X86_FEATURE_MTRR)
124 #define cpu_has_mmx boot_cpu_has(X86_FEATURE_MMX)
125 #define cpu_has_fxsr boot_cpu_has(X86_FEATURE_FXSR)
126 #define cpu_has_xmm boot_cpu_has(X86_FEATURE_XMM)
127 #define cpu_has_xmm2 boot_cpu_has(X86_FEATURE_XMM2)
128 #define cpu_has_xmm3 boot_cpu_has(X86_FEATURE_XMM3)
129 #define cpu_has_ht boot_cpu_has(X86_FEATURE_HT)
130 #define cpu_has_mp boot_cpu_has(X86_FEATURE_MP)
131 #define cpu_has_nx boot_cpu_has(X86_FEATURE_NX)
132 #define cpu_has_k6_mtrr boot_cpu_has(X86_FEATURE_K6_MTRR)
133 #define cpu_has_cyrix_arr boot_cpu_has(X86_FEATURE_CYRIX_ARR)
134 #define cpu_has_centaur_mcr boot_cpu_has(X86_FEATURE_CENTAUR_MCR)
135 #define cpu_has_xstore boot_cpu_has(X86_FEATURE_XSTORE)
136 #define cpu_has_xstore_enabled boot_cpu_has(X86_FEATURE_XSTORE_EN)
137 #define cpu_has_xcrypt boot_cpu_has(X86_FEATURE_XCRYPT)
138 #define cpu_has_xcrypt_enabled boot_cpu_has(X86_FEATURE_XCRYPT_EN)
139 #define cpu_has_ace2 boot_cpu_has(X86_FEATURE_ACE2)
140 #define cpu_has_ace2_enabled boot_cpu_has(X86_FEATURE_ACE2_EN)
141 #define cpu_has_phe boot_cpu_has(X86_FEATURE_PHE)
142 #define cpu_has_phe_enabled boot_cpu_has(X86_FEATURE_PHE_EN)
143 #define cpu_has_pmm boot_cpu_has(X86_FEATURE_PMM)
144 #define cpu_has_pmm_enabled boot_cpu_has(X86_FEATURE_PMM_EN)
145 #define cpu_has_ds boot_cpu_has(X86_FEATURE_DS)
146 #define cpu_has_pebs boot_cpu_has(X86_FEATURE_PEBS)
147 #define cpu_has_clflush boot_cpu_has(X86_FEATURE_CLFLSH)
148 #define cpu_has_bts boot_cpu_has(X86_FEATURE_BTS)
149 
150 #endif
151 
152