The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 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 | *** |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef __ASM_I386_CPUFEATURE_H |
| 20 | #define __ASM_I386_CPUFEATURE_H |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 21 | #ifndef __ASSEMBLY__ |
| 22 | #include <linux/bitops.h> |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 23 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 24 | #endif |
| 25 | #include <asm/required-features.h> |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 26 | #define NCAPINTS 8 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 27 | #define X86_FEATURE_FPU (0*32+ 0) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 28 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 29 | #define X86_FEATURE_VME (0*32+ 1) |
| 30 | #define X86_FEATURE_DE (0*32+ 2) |
| 31 | #define X86_FEATURE_PSE (0*32+ 3) |
| 32 | #define X86_FEATURE_TSC (0*32+ 4) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 33 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 34 | #define X86_FEATURE_MSR (0*32+ 5) |
| 35 | #define X86_FEATURE_PAE (0*32+ 6) |
| 36 | #define X86_FEATURE_MCE (0*32+ 7) |
| 37 | #define X86_FEATURE_CX8 (0*32+ 8) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 38 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 39 | #define X86_FEATURE_APIC (0*32+ 9) |
| 40 | #define X86_FEATURE_SEP (0*32+11) |
| 41 | #define X86_FEATURE_MTRR (0*32+12) |
| 42 | #define X86_FEATURE_PGE (0*32+13) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 43 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 44 | #define X86_FEATURE_MCA (0*32+14) |
| 45 | #define X86_FEATURE_CMOV (0*32+15) |
| 46 | #define X86_FEATURE_PAT (0*32+16) |
| 47 | #define X86_FEATURE_PSE36 (0*32+17) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 48 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 49 | #define X86_FEATURE_PN (0*32+18) |
| 50 | #define X86_FEATURE_CLFLSH (0*32+19) |
| 51 | #define X86_FEATURE_DS (0*32+21) |
| 52 | #define X86_FEATURE_ACPI (0*32+22) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 53 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 54 | #define X86_FEATURE_MMX (0*32+23) |
| 55 | #define X86_FEATURE_FXSR (0*32+24) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 56 | #define X86_FEATURE_XMM (0*32+25) |
| 57 | #define X86_FEATURE_XMM2 (0*32+26) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 58 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 59 | #define X86_FEATURE_SELFSNOOP (0*32+27) |
| 60 | #define X86_FEATURE_HT (0*32+28) |
| 61 | #define X86_FEATURE_ACC (0*32+29) |
| 62 | #define X86_FEATURE_IA64 (0*32+30) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 63 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 64 | #define X86_FEATURE_SYSCALL (1*32+11) |
| 65 | #define X86_FEATURE_MP (1*32+19) |
| 66 | #define X86_FEATURE_NX (1*32+20) |
| 67 | #define X86_FEATURE_MMXEXT (1*32+22) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 68 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 69 | #define X86_FEATURE_RDTSCP (1*32+27) |
| 70 | #define X86_FEATURE_LM (1*32+29) |
| 71 | #define X86_FEATURE_3DNOWEXT (1*32+30) |
| 72 | #define X86_FEATURE_3DNOW (1*32+31) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 73 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 74 | #define X86_FEATURE_RECOVERY (2*32+ 0) |
| 75 | #define X86_FEATURE_LONGRUN (2*32+ 1) |
| 76 | #define X86_FEATURE_LRTI (2*32+ 3) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 77 | #define X86_FEATURE_CXMMX (3*32+ 0) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 78 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 79 | #define X86_FEATURE_K6_MTRR (3*32+ 1) |
| 80 | #define X86_FEATURE_CYRIX_ARR (3*32+ 2) |
| 81 | #define X86_FEATURE_CENTAUR_MCR (3*32+ 3) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 82 | #define X86_FEATURE_K8 (3*32+ 4) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 83 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 84 | #define X86_FEATURE_K7 (3*32+ 5) |
| 85 | #define X86_FEATURE_P3 (3*32+ 6) |
| 86 | #define X86_FEATURE_P4 (3*32+ 7) |
| 87 | #define X86_FEATURE_CONSTANT_TSC (3*32+ 8) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 88 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 89 | #define X86_FEATURE_UP (3*32+ 9) |
| 90 | #define X86_FEATURE_FXSAVE_LEAK (3*32+10) |
| 91 | #define X86_FEATURE_ARCH_PERFMON (3*32+11) |
| 92 | #define X86_FEATURE_PEBS (3*32+12) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 93 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 94 | #define X86_FEATURE_BTS (3*32+13) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 95 | #define X86_FEATURE_SYNC_RDTSC (3*32+15) |
| 96 | #define X86_FEATURE_REP_GOOD (3*32+16) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 97 | #define X86_FEATURE_XMM3 (4*32+ 0) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 98 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 99 | #define X86_FEATURE_MWAIT (4*32+ 3) |
| 100 | #define X86_FEATURE_DSCPL (4*32+ 4) |
| 101 | #define X86_FEATURE_EST (4*32+ 7) |
| 102 | #define X86_FEATURE_TM2 (4*32+ 8) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 103 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 104 | #define X86_FEATURE_CID (4*32+10) |
| 105 | #define X86_FEATURE_CX16 (4*32+13) |
| 106 | #define X86_FEATURE_XTPR (4*32+14) |
| 107 | #define X86_FEATURE_DCA (4*32+18) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 108 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 109 | #define X86_FEATURE_XSTORE (5*32+ 2) |
| 110 | #define X86_FEATURE_XSTORE_EN (5*32+ 3) |
| 111 | #define X86_FEATURE_XCRYPT (5*32+ 6) |
| 112 | #define X86_FEATURE_XCRYPT_EN (5*32+ 7) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 113 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 114 | #define X86_FEATURE_ACE2 (5*32+ 8) |
| 115 | #define X86_FEATURE_ACE2_EN (5*32+ 9) |
| 116 | #define X86_FEATURE_PHE (5*32+ 10) |
| 117 | #define X86_FEATURE_PHE_EN (5*32+ 11) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 118 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 119 | #define X86_FEATURE_PMM (5*32+ 12) |
| 120 | #define X86_FEATURE_PMM_EN (5*32+ 13) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 121 | #define X86_FEATURE_LAHF_LM (6*32+ 0) |
| 122 | #define X86_FEATURE_CMP_LEGACY (6*32+ 1) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 123 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 124 | #define X86_FEATURE_IDA (7*32+ 0) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 125 | #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)) |
| 126 | #define boot_cpu_has(bit) cpu_has(&boot_cpu_data, bit) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 127 | #define cpu_has_fpu boot_cpu_has(X86_FEATURE_FPU) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 128 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 129 | #define cpu_has_vme boot_cpu_has(X86_FEATURE_VME) |
| 130 | #define cpu_has_de boot_cpu_has(X86_FEATURE_DE) |
| 131 | #define cpu_has_pse boot_cpu_has(X86_FEATURE_PSE) |
| 132 | #define cpu_has_tsc boot_cpu_has(X86_FEATURE_TSC) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 133 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 134 | #define cpu_has_pae boot_cpu_has(X86_FEATURE_PAE) |
| 135 | #define cpu_has_pge boot_cpu_has(X86_FEATURE_PGE) |
| 136 | #define cpu_has_apic boot_cpu_has(X86_FEATURE_APIC) |
| 137 | #define cpu_has_sep boot_cpu_has(X86_FEATURE_SEP) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 138 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 139 | #define cpu_has_mtrr boot_cpu_has(X86_FEATURE_MTRR) |
| 140 | #define cpu_has_mmx boot_cpu_has(X86_FEATURE_MMX) |
| 141 | #define cpu_has_fxsr boot_cpu_has(X86_FEATURE_FXSR) |
| 142 | #define cpu_has_xmm boot_cpu_has(X86_FEATURE_XMM) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 143 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 144 | #define cpu_has_xmm2 boot_cpu_has(X86_FEATURE_XMM2) |
| 145 | #define cpu_has_xmm3 boot_cpu_has(X86_FEATURE_XMM3) |
| 146 | #define cpu_has_ht boot_cpu_has(X86_FEATURE_HT) |
| 147 | #define cpu_has_mp boot_cpu_has(X86_FEATURE_MP) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 148 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 149 | #define cpu_has_nx boot_cpu_has(X86_FEATURE_NX) |
| 150 | #define cpu_has_k6_mtrr boot_cpu_has(X86_FEATURE_K6_MTRR) |
| 151 | #define cpu_has_cyrix_arr boot_cpu_has(X86_FEATURE_CYRIX_ARR) |
| 152 | #define cpu_has_centaur_mcr boot_cpu_has(X86_FEATURE_CENTAUR_MCR) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 153 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 154 | #define cpu_has_xstore boot_cpu_has(X86_FEATURE_XSTORE) |
| 155 | #define cpu_has_xstore_enabled boot_cpu_has(X86_FEATURE_XSTORE_EN) |
| 156 | #define cpu_has_xcrypt boot_cpu_has(X86_FEATURE_XCRYPT) |
| 157 | #define cpu_has_xcrypt_enabled boot_cpu_has(X86_FEATURE_XCRYPT_EN) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 158 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 159 | #define cpu_has_ace2 boot_cpu_has(X86_FEATURE_ACE2) |
| 160 | #define cpu_has_ace2_enabled boot_cpu_has(X86_FEATURE_ACE2_EN) |
| 161 | #define cpu_has_phe boot_cpu_has(X86_FEATURE_PHE) |
| 162 | #define cpu_has_phe_enabled boot_cpu_has(X86_FEATURE_PHE_EN) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 163 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 164 | #define cpu_has_pmm boot_cpu_has(X86_FEATURE_PMM) |
| 165 | #define cpu_has_pmm_enabled boot_cpu_has(X86_FEATURE_PMM_EN) |
| 166 | #define cpu_has_ds boot_cpu_has(X86_FEATURE_DS) |
| 167 | #define cpu_has_pebs boot_cpu_has(X86_FEATURE_PEBS) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 168 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 169 | #define cpu_has_clflush boot_cpu_has(X86_FEATURE_CLFLSH) |
| 170 | #define cpu_has_bts boot_cpu_has(X86_FEATURE_BTS) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 171 | #endif |