Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #include <linux/init.h> |
| 2 | #include <linux/kernel.h> |
| 3 | |
| 4 | #include <linux/string.h> |
| 5 | #include <linux/bitops.h> |
| 6 | #include <linux/smp.h> |
| 7 | #include <linux/thread_info.h> |
Nick Piggin | 53e86b9 | 2005-11-13 16:07:23 -0800 | [diff] [blame] | 8 | #include <linux/module.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | |
| 10 | #include <asm/processor.h> |
Sam Ravnborg | d72b1b4 | 2007-10-17 18:04:33 +0200 | [diff] [blame] | 11 | #include <asm/pgtable.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | #include <asm/msr.h> |
| 13 | #include <asm/uaccess.h> |
Markus Metzger | eee3af4 | 2008-01-30 13:31:09 +0100 | [diff] [blame] | 14 | #include <asm/ds.h> |
Harvey Harrison | 73bdb73 | 2008-02-04 16:48:04 +0100 | [diff] [blame] | 15 | #include <asm/bugs.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | |
Yinghai Lu | 185f3b9 | 2008-09-09 16:40:35 -0700 | [diff] [blame] | 17 | #ifdef CONFIG_X86_64 |
| 18 | #include <asm/topology.h> |
| 19 | #include <asm/numa_64.h> |
| 20 | #endif |
| 21 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | #include "cpu.h" |
| 23 | |
| 24 | #ifdef CONFIG_X86_LOCAL_APIC |
| 25 | #include <asm/mpspec.h> |
| 26 | #include <asm/apic.h> |
| 27 | #include <mach_apic.h> |
| 28 | #endif |
| 29 | |
Thomas Petazzoni | 03ae576 | 2008-02-15 12:00:23 +0100 | [diff] [blame] | 30 | static void __cpuinit early_init_intel(struct cpuinfo_x86 *c) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | { |
Andi Kleen | 2b16a23 | 2008-01-30 13:32:40 +0100 | [diff] [blame] | 32 | if ((c->x86 == 0xf && c->x86_model >= 0x03) || |
| 33 | (c->x86 == 0x6 && c->x86_model >= 0x0e)) |
| 34 | set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); |
Yinghai Lu | 185f3b9 | 2008-09-09 16:40:35 -0700 | [diff] [blame] | 35 | |
| 36 | #ifdef CONFIG_X86_64 |
| 37 | set_cpu_cap(c, X86_FEATURE_SYSENTER32); |
| 38 | #else |
| 39 | /* Netburst reports 64 bytes clflush size, but does IO in 128 bytes */ |
| 40 | if (c->x86 == 15 && c->x86_cache_alignment == 64) |
| 41 | c->x86_cache_alignment = 128; |
| 42 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 43 | } |
| 44 | |
Yinghai Lu | 185f3b9 | 2008-09-09 16:40:35 -0700 | [diff] [blame] | 45 | #ifdef CONFIG_X86_32 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 46 | /* |
| 47 | * Early probe support logic for ppro memory erratum #50 |
| 48 | * |
| 49 | * This is called before we do cpu ident work |
| 50 | */ |
Paolo Ciarrocchi | 65eb6b4 | 2008-02-22 23:09:42 +0100 | [diff] [blame] | 51 | |
Chuck Ebbert | 3bc9b76 | 2006-03-23 02:59:33 -0800 | [diff] [blame] | 52 | int __cpuinit ppro_with_ram_bug(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | { |
| 54 | /* Uses data from early_cpu_detect now */ |
| 55 | if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && |
| 56 | boot_cpu_data.x86 == 6 && |
| 57 | boot_cpu_data.x86_model == 1 && |
| 58 | boot_cpu_data.x86_mask < 8) { |
| 59 | printk(KERN_INFO "Pentium Pro with Errata#50 detected. Taking evasive action.\n"); |
| 60 | return 1; |
| 61 | } |
| 62 | return 0; |
| 63 | } |
Paolo Ciarrocchi | 65eb6b4 | 2008-02-22 23:09:42 +0100 | [diff] [blame] | 64 | |
Yinghai Lu | 185f3b9 | 2008-09-09 16:40:35 -0700 | [diff] [blame] | 65 | #ifdef CONFIG_X86_F00F_BUG |
| 66 | static void __cpuinit trap_init_f00f_bug(void) |
| 67 | { |
| 68 | __set_fixmap(FIX_F00F_IDT, __pa(&idt_table), PAGE_KERNEL_RO); |
| 69 | |
| 70 | /* |
| 71 | * Update the IDT descriptor and reload the IDT so that |
| 72 | * it uses the read-only mapped virtual address. |
| 73 | */ |
| 74 | idt_descr.address = fix_to_virt(FIX_F00F_IDT); |
| 75 | load_idt(&idt_descr); |
| 76 | } |
| 77 | #endif |
Yinghai Lu | 4052704 | 2008-09-09 16:40:38 -0700 | [diff] [blame] | 78 | |
| 79 | static void __cpuinit intel_workarounds(struct cpuinfo_x86 *c) |
| 80 | { |
| 81 | unsigned long lo, hi; |
| 82 | |
| 83 | #ifdef CONFIG_X86_F00F_BUG |
| 84 | /* |
| 85 | * All current models of Pentium and Pentium with MMX technology CPUs |
| 86 | * have the F0 0F bug, which lets nonprivileged users lock up the system. |
| 87 | * Note that the workaround only should be initialized once... |
| 88 | */ |
| 89 | c->f00f_bug = 0; |
| 90 | if (!paravirt_enabled() && c->x86 == 5) { |
| 91 | static int f00f_workaround_enabled; |
| 92 | |
| 93 | c->f00f_bug = 1; |
| 94 | if (!f00f_workaround_enabled) { |
| 95 | trap_init_f00f_bug(); |
| 96 | printk(KERN_NOTICE "Intel Pentium with F0 0F bug - workaround enabled.\n"); |
| 97 | f00f_workaround_enabled = 1; |
| 98 | } |
| 99 | } |
| 100 | #endif |
| 101 | |
| 102 | /* |
| 103 | * SEP CPUID bug: Pentium Pro reports SEP but doesn't have it until |
| 104 | * model 3 mask 3 |
| 105 | */ |
| 106 | if ((c->x86<<8 | c->x86_model<<4 | c->x86_mask) < 0x633) |
| 107 | clear_cpu_cap(c, X86_FEATURE_SEP); |
| 108 | |
| 109 | /* |
| 110 | * P4 Xeon errata 037 workaround. |
| 111 | * Hardware prefetcher may cause stale data to be loaded into the cache. |
| 112 | */ |
| 113 | if ((c->x86 == 15) && (c->x86_model == 1) && (c->x86_mask == 1)) { |
| 114 | rdmsr(MSR_IA32_MISC_ENABLE, lo, hi); |
| 115 | if ((lo & (1<<9)) == 0) { |
| 116 | printk (KERN_INFO "CPU: C0 stepping P4 Xeon detected.\n"); |
| 117 | printk (KERN_INFO "CPU: Disabling hardware prefetching (Errata 037)\n"); |
| 118 | lo |= (1<<9); /* Disable hw prefetching */ |
| 119 | wrmsr (MSR_IA32_MISC_ENABLE, lo, hi); |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | /* |
| 124 | * See if we have a good local APIC by checking for buggy Pentia, |
| 125 | * i.e. all B steppings and the C2 stepping of P54C when using their |
| 126 | * integrated APIC (see 11AP erratum in "Pentium Processor |
| 127 | * Specification Update"). |
| 128 | */ |
| 129 | if (cpu_has_apic && (c->x86<<8 | c->x86_model<<4) == 0x520 && |
| 130 | (c->x86_mask < 0x6 || c->x86_mask == 0xb)) |
| 131 | set_cpu_cap(c, X86_FEATURE_11AP); |
| 132 | |
| 133 | |
| 134 | #ifdef CONFIG_X86_INTEL_USERCOPY |
| 135 | /* |
| 136 | * Set up the preferred alignment for movsl bulk memory moves |
| 137 | */ |
| 138 | switch (c->x86) { |
| 139 | case 4: /* 486: untested */ |
| 140 | break; |
| 141 | case 5: /* Old Pentia: untested */ |
| 142 | break; |
| 143 | case 6: /* PII/PIII only like movsl with 8-byte alignment */ |
| 144 | movsl_mask.mask = 7; |
| 145 | break; |
| 146 | case 15: /* P4 is OK down to 8-byte alignment */ |
| 147 | movsl_mask.mask = 7; |
| 148 | break; |
| 149 | } |
| 150 | #endif |
| 151 | |
| 152 | #ifdef CONFIG_X86_NUMAQ |
| 153 | numaq_tsc_disable(); |
| 154 | #endif |
| 155 | } |
| 156 | #else |
| 157 | static void __cpuinit intel_workarounds(struct cpuinfo_x86 *c) |
| 158 | { |
| 159 | } |
Yinghai Lu | 185f3b9 | 2008-09-09 16:40:35 -0700 | [diff] [blame] | 160 | #endif |
| 161 | |
| 162 | static void __cpuinit srat_detect_node(void) |
| 163 | { |
| 164 | #if defined(CONFIG_NUMA) && defined(CONFIG_X86_64) |
| 165 | unsigned node; |
| 166 | int cpu = smp_processor_id(); |
| 167 | int apicid = hard_smp_processor_id(); |
| 168 | |
| 169 | /* Don't do the funky fallback heuristics the AMD version employs |
| 170 | for now. */ |
| 171 | node = apicid_to_node[apicid]; |
| 172 | if (node == NUMA_NO_NODE || !node_online(node)) |
| 173 | node = first_node(node_online_map); |
| 174 | numa_set_node(cpu, node); |
| 175 | |
Yinghai Lu | 823b259 | 2008-09-10 21:56:46 -0700 | [diff] [blame] | 176 | printk(KERN_INFO "CPU %d/0x%x -> Node %d\n", cpu, apicid, node); |
Yinghai Lu | 185f3b9 | 2008-09-09 16:40:35 -0700 | [diff] [blame] | 177 | #endif |
| 178 | } |
| 179 | |
Andi Kleen | 3dd9d51 | 2005-04-16 15:25:15 -0700 | [diff] [blame] | 180 | /* |
| 181 | * find out the number of processor cores on the die |
| 182 | */ |
Yinghai Lu | f69feff | 2008-09-07 17:58:58 -0700 | [diff] [blame] | 183 | static int __cpuinit intel_num_cpu_cores(struct cpuinfo_x86 *c) |
Andi Kleen | 3dd9d51 | 2005-04-16 15:25:15 -0700 | [diff] [blame] | 184 | { |
Zachary Amsden | f2ab446 | 2005-09-03 15:56:42 -0700 | [diff] [blame] | 185 | unsigned int eax, ebx, ecx, edx; |
Andi Kleen | 3dd9d51 | 2005-04-16 15:25:15 -0700 | [diff] [blame] | 186 | |
| 187 | if (c->cpuid_level < 4) |
| 188 | return 1; |
| 189 | |
Zachary Amsden | f2ab446 | 2005-09-03 15:56:42 -0700 | [diff] [blame] | 190 | /* Intel has a non-standard dependency on %ecx for this CPUID level. */ |
| 191 | cpuid_count(4, 0, &eax, &ebx, &ecx, &edx); |
Andi Kleen | 3dd9d51 | 2005-04-16 15:25:15 -0700 | [diff] [blame] | 192 | if (eax & 0x1f) |
| 193 | return ((eax >> 26) + 1); |
| 194 | else |
| 195 | return 1; |
| 196 | } |
| 197 | |
Sheng Yang | e38e05a | 2008-09-10 18:53:34 +0800 | [diff] [blame] | 198 | static void __cpuinit detect_vmx_virtcap(struct cpuinfo_x86 *c) |
| 199 | { |
| 200 | /* Intel VMX MSR indicated features */ |
| 201 | #define X86_VMX_FEATURE_PROC_CTLS_TPR_SHADOW 0x00200000 |
| 202 | #define X86_VMX_FEATURE_PROC_CTLS_VNMI 0x00400000 |
| 203 | #define X86_VMX_FEATURE_PROC_CTLS_2ND_CTLS 0x80000000 |
| 204 | #define X86_VMX_FEATURE_PROC_CTLS2_VIRT_APIC 0x00000001 |
| 205 | #define X86_VMX_FEATURE_PROC_CTLS2_EPT 0x00000002 |
| 206 | #define X86_VMX_FEATURE_PROC_CTLS2_VPID 0x00000020 |
| 207 | |
| 208 | u32 vmx_msr_low, vmx_msr_high, msr_ctl, msr_ctl2; |
| 209 | |
| 210 | clear_cpu_cap(c, X86_FEATURE_TPR_SHADOW); |
| 211 | clear_cpu_cap(c, X86_FEATURE_VNMI); |
| 212 | clear_cpu_cap(c, X86_FEATURE_FLEXPRIORITY); |
| 213 | clear_cpu_cap(c, X86_FEATURE_EPT); |
| 214 | clear_cpu_cap(c, X86_FEATURE_VPID); |
| 215 | |
| 216 | rdmsr(MSR_IA32_VMX_PROCBASED_CTLS, vmx_msr_low, vmx_msr_high); |
| 217 | msr_ctl = vmx_msr_high | vmx_msr_low; |
| 218 | if (msr_ctl & X86_VMX_FEATURE_PROC_CTLS_TPR_SHADOW) |
| 219 | set_cpu_cap(c, X86_FEATURE_TPR_SHADOW); |
| 220 | if (msr_ctl & X86_VMX_FEATURE_PROC_CTLS_VNMI) |
| 221 | set_cpu_cap(c, X86_FEATURE_VNMI); |
| 222 | if (msr_ctl & X86_VMX_FEATURE_PROC_CTLS_2ND_CTLS) { |
| 223 | rdmsr(MSR_IA32_VMX_PROCBASED_CTLS2, |
| 224 | vmx_msr_low, vmx_msr_high); |
| 225 | msr_ctl2 = vmx_msr_high | vmx_msr_low; |
| 226 | if ((msr_ctl2 & X86_VMX_FEATURE_PROC_CTLS2_VIRT_APIC) && |
| 227 | (msr_ctl & X86_VMX_FEATURE_PROC_CTLS_TPR_SHADOW)) |
| 228 | set_cpu_cap(c, X86_FEATURE_FLEXPRIORITY); |
| 229 | if (msr_ctl2 & X86_VMX_FEATURE_PROC_CTLS2_EPT) |
| 230 | set_cpu_cap(c, X86_FEATURE_EPT); |
| 231 | if (msr_ctl2 & X86_VMX_FEATURE_PROC_CTLS2_VPID) |
| 232 | set_cpu_cap(c, X86_FEATURE_VPID); |
| 233 | } |
| 234 | } |
| 235 | |
Chuck Ebbert | 3bc9b76 | 2006-03-23 02:59:33 -0800 | [diff] [blame] | 236 | static void __cpuinit init_intel(struct cpuinfo_x86 *c) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 237 | { |
| 238 | unsigned int l2 = 0; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 239 | |
Andi Kleen | 2b16a23 | 2008-01-30 13:32:40 +0100 | [diff] [blame] | 240 | early_init_intel(c); |
| 241 | |
Yinghai Lu | 4052704 | 2008-09-09 16:40:38 -0700 | [diff] [blame] | 242 | intel_workarounds(c); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 243 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 244 | l2 = init_intel_cacheinfo(c); |
Paolo Ciarrocchi | 65eb6b4 | 2008-02-22 23:09:42 +0100 | [diff] [blame] | 245 | if (c->cpuid_level > 9) { |
Venkatesh Pallipadi | 0080e66 | 2006-06-26 13:59:59 +0200 | [diff] [blame] | 246 | unsigned eax = cpuid_eax(10); |
| 247 | /* Check for version and the number of counters */ |
| 248 | if ((eax & 0xff) && (((eax>>8) & 0xff) > 1)) |
Ingo Molnar | d0e95eb | 2008-02-26 08:52:33 +0100 | [diff] [blame] | 249 | set_cpu_cap(c, X86_FEATURE_ARCH_PERFMON); |
Venkatesh Pallipadi | 0080e66 | 2006-06-26 13:59:59 +0200 | [diff] [blame] | 250 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 251 | |
Yinghai Lu | 4052704 | 2008-09-09 16:40:38 -0700 | [diff] [blame] | 252 | if (cpu_has_xmm2) |
| 253 | set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC); |
| 254 | if (cpu_has_ds) { |
| 255 | unsigned int l1; |
| 256 | rdmsr(MSR_IA32_MISC_ENABLE, l1, l2); |
| 257 | if (!(l1 & (1<<11))) |
| 258 | set_cpu_cap(c, X86_FEATURE_BTS); |
| 259 | if (!(l1 & (1<<12))) |
| 260 | set_cpu_cap(c, X86_FEATURE_PEBS); |
| 261 | ds_init_intel(c); |
| 262 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 263 | |
Yinghai Lu | 4052704 | 2008-09-09 16:40:38 -0700 | [diff] [blame] | 264 | #ifdef CONFIG_X86_64 |
| 265 | if (c->x86 == 15) |
| 266 | c->x86_cache_alignment = c->x86_clflush_size * 2; |
| 267 | if (c->x86 == 6) |
| 268 | set_cpu_cap(c, X86_FEATURE_REP_GOOD); |
| 269 | #else |
Paolo Ciarrocchi | 65eb6b4 | 2008-02-22 23:09:42 +0100 | [diff] [blame] | 270 | /* |
| 271 | * Names for the Pentium II/Celeron processors |
| 272 | * detectable only by also checking the cache size. |
| 273 | * Dixon is NOT a Celeron. |
| 274 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 275 | if (c->x86 == 6) { |
Yinghai Lu | 4052704 | 2008-09-09 16:40:38 -0700 | [diff] [blame] | 276 | char *p = NULL; |
| 277 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 278 | switch (c->x86_model) { |
| 279 | case 5: |
| 280 | if (c->x86_mask == 0) { |
| 281 | if (l2 == 0) |
| 282 | p = "Celeron (Covington)"; |
| 283 | else if (l2 == 256) |
| 284 | p = "Mobile Pentium II (Dixon)"; |
| 285 | } |
| 286 | break; |
Paolo Ciarrocchi | 65eb6b4 | 2008-02-22 23:09:42 +0100 | [diff] [blame] | 287 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 288 | case 6: |
| 289 | if (l2 == 128) |
| 290 | p = "Celeron (Mendocino)"; |
| 291 | else if (c->x86_mask == 0 || c->x86_mask == 5) |
| 292 | p = "Celeron-A"; |
| 293 | break; |
Paolo Ciarrocchi | 65eb6b4 | 2008-02-22 23:09:42 +0100 | [diff] [blame] | 294 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 295 | case 8: |
| 296 | if (l2 == 128) |
| 297 | p = "Celeron (Coppermine)"; |
| 298 | break; |
| 299 | } |
Yinghai Lu | 4052704 | 2008-09-09 16:40:38 -0700 | [diff] [blame] | 300 | |
| 301 | if (p) |
| 302 | strcpy(c->x86_model_id, p); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 303 | } |
| 304 | |
Yinghai Lu | 185f3b9 | 2008-09-09 16:40:35 -0700 | [diff] [blame] | 305 | if (c->x86 == 15) |
| 306 | set_cpu_cap(c, X86_FEATURE_P4); |
| 307 | if (c->x86 == 6) |
| 308 | set_cpu_cap(c, X86_FEATURE_P3); |
Markus Metzger | f4166c5 | 2008-11-09 14:29:21 +0100 | [diff] [blame] | 309 | #endif |
Yinghai Lu | 185f3b9 | 2008-09-09 16:40:35 -0700 | [diff] [blame] | 310 | |
Yinghai Lu | 185f3b9 | 2008-09-09 16:40:35 -0700 | [diff] [blame] | 311 | detect_extended_topology(c); |
| 312 | if (!cpu_has(c, X86_FEATURE_XTOPOLOGY)) { |
| 313 | /* |
| 314 | * let's use the legacy cpuid vector 0x1 and 0x4 for topology |
| 315 | * detection. |
| 316 | */ |
| 317 | c->x86_max_cores = intel_num_cpu_cores(c); |
| 318 | #ifdef CONFIG_X86_32 |
| 319 | detect_ht(c); |
| 320 | #endif |
| 321 | } |
| 322 | |
| 323 | /* Work around errata */ |
| 324 | srat_detect_node(); |
Sheng Yang | e38e05a | 2008-09-10 18:53:34 +0800 | [diff] [blame] | 325 | |
| 326 | if (cpu_has(c, X86_FEATURE_VMX)) |
| 327 | detect_vmx_virtcap(c); |
Stephane Eranian | 42ed458 | 2006-12-07 02:14:01 +0100 | [diff] [blame] | 328 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 329 | |
Yinghai Lu | 185f3b9 | 2008-09-09 16:40:35 -0700 | [diff] [blame] | 330 | #ifdef CONFIG_X86_32 |
Paolo Ciarrocchi | 65eb6b4 | 2008-02-22 23:09:42 +0100 | [diff] [blame] | 331 | static unsigned int __cpuinit intel_size_cache(struct cpuinfo_x86 *c, unsigned int size) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 332 | { |
Paolo Ciarrocchi | 65eb6b4 | 2008-02-22 23:09:42 +0100 | [diff] [blame] | 333 | /* |
| 334 | * Intel PIII Tualatin. This comes in two flavours. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 335 | * One has 256kb of cache, the other 512. We have no way |
| 336 | * to determine which, so we use a boottime override |
| 337 | * for the 512kb model, and assume 256 otherwise. |
| 338 | */ |
| 339 | if ((c->x86 == 6) && (c->x86_model == 11) && (size == 0)) |
| 340 | size = 256; |
| 341 | return size; |
| 342 | } |
Yinghai Lu | 185f3b9 | 2008-09-09 16:40:35 -0700 | [diff] [blame] | 343 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 344 | |
Chuck Ebbert | 3bc9b76 | 2006-03-23 02:59:33 -0800 | [diff] [blame] | 345 | static struct cpu_dev intel_cpu_dev __cpuinitdata = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 346 | .c_vendor = "Intel", |
Paolo Ciarrocchi | 65eb6b4 | 2008-02-22 23:09:42 +0100 | [diff] [blame] | 347 | .c_ident = { "GenuineIntel" }, |
Yinghai Lu | 185f3b9 | 2008-09-09 16:40:35 -0700 | [diff] [blame] | 348 | #ifdef CONFIG_X86_32 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 349 | .c_models = { |
Paolo Ciarrocchi | 65eb6b4 | 2008-02-22 23:09:42 +0100 | [diff] [blame] | 350 | { .vendor = X86_VENDOR_INTEL, .family = 4, .model_names = |
| 351 | { |
| 352 | [0] = "486 DX-25/33", |
| 353 | [1] = "486 DX-50", |
| 354 | [2] = "486 SX", |
| 355 | [3] = "486 DX/2", |
| 356 | [4] = "486 SL", |
| 357 | [5] = "486 SX/2", |
| 358 | [7] = "486 DX/2-WB", |
| 359 | [8] = "486 DX/4", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 360 | [9] = "486 DX/4-WB" |
| 361 | } |
| 362 | }, |
| 363 | { .vendor = X86_VENDOR_INTEL, .family = 5, .model_names = |
Paolo Ciarrocchi | 65eb6b4 | 2008-02-22 23:09:42 +0100 | [diff] [blame] | 364 | { |
| 365 | [0] = "Pentium 60/66 A-step", |
| 366 | [1] = "Pentium 60/66", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 367 | [2] = "Pentium 75 - 200", |
Paolo Ciarrocchi | 65eb6b4 | 2008-02-22 23:09:42 +0100 | [diff] [blame] | 368 | [3] = "OverDrive PODP5V83", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 369 | [4] = "Pentium MMX", |
Paolo Ciarrocchi | 65eb6b4 | 2008-02-22 23:09:42 +0100 | [diff] [blame] | 370 | [7] = "Mobile Pentium 75 - 200", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 371 | [8] = "Mobile Pentium MMX" |
| 372 | } |
| 373 | }, |
| 374 | { .vendor = X86_VENDOR_INTEL, .family = 6, .model_names = |
Paolo Ciarrocchi | 65eb6b4 | 2008-02-22 23:09:42 +0100 | [diff] [blame] | 375 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 376 | [0] = "Pentium Pro A-step", |
Paolo Ciarrocchi | 65eb6b4 | 2008-02-22 23:09:42 +0100 | [diff] [blame] | 377 | [1] = "Pentium Pro", |
| 378 | [3] = "Pentium II (Klamath)", |
| 379 | [4] = "Pentium II (Deschutes)", |
| 380 | [5] = "Pentium II (Deschutes)", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 381 | [6] = "Mobile Pentium II", |
Paolo Ciarrocchi | 65eb6b4 | 2008-02-22 23:09:42 +0100 | [diff] [blame] | 382 | [7] = "Pentium III (Katmai)", |
| 383 | [8] = "Pentium III (Coppermine)", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 384 | [10] = "Pentium III (Cascades)", |
| 385 | [11] = "Pentium III (Tualatin)", |
| 386 | } |
| 387 | }, |
| 388 | { .vendor = X86_VENDOR_INTEL, .family = 15, .model_names = |
| 389 | { |
| 390 | [0] = "Pentium 4 (Unknown)", |
| 391 | [1] = "Pentium 4 (Willamette)", |
| 392 | [2] = "Pentium 4 (Northwood)", |
| 393 | [4] = "Pentium 4 (Foster)", |
| 394 | [5] = "Pentium 4 (Foster)", |
| 395 | } |
| 396 | }, |
| 397 | }, |
Yinghai Lu | 185f3b9 | 2008-09-09 16:40:35 -0700 | [diff] [blame] | 398 | .c_size_cache = intel_size_cache, |
| 399 | #endif |
Thomas Petazzoni | 03ae576 | 2008-02-15 12:00:23 +0100 | [diff] [blame] | 400 | .c_early_init = early_init_intel, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 401 | .c_init = init_intel, |
Yinghai Lu | 10a434f | 2008-09-04 21:09:45 +0200 | [diff] [blame] | 402 | .c_x86_vendor = X86_VENDOR_INTEL, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 403 | }; |
| 404 | |
Yinghai Lu | 10a434f | 2008-09-04 21:09:45 +0200 | [diff] [blame] | 405 | cpu_dev_register(intel_cpu_dev); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 406 | |