2 * Routines to indentify additional cpu features that are scattered in
8 #include <asm/processor.h>
24 void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c)
28 const struct cpuid_bit *cb;
30 static const struct cpuid_bit cpuid_bits[] = {
31 { X86_FEATURE_IDA, CR_EAX, 1, 0x00000006 },
35 for (cb = cpuid_bits; cb->feature; cb++) {
37 /* Verify that the level is valid */
38 max_level = cpuid_eax(cb->level & 0xffff0000);
39 if (max_level < cb->level ||
40 max_level > (cb->level | 0xffff))
43 cpuid(cb->level, ®s[CR_EAX], ®s[CR_EBX],
44 ®s[CR_ECX], ®s[CR_EDX]);
46 if (regs[cb->reg] & (1 << cb->bit))
47 set_cpu_cap(c, cb->feature);
52 void __cpuinit validate_pat_support(struct cpuinfo_x86 *c)
55 pat_disable("PAT not supported by CPU.");
57 switch (c->x86_vendor) {
58 case X86_VENDOR_INTEL:
60 * There is a known erratum on Pentium III and Core Solo
62 * " Page with PAT set to WC while associated MTRR is UC
63 * may consolidate to UC "
64 * Because of this erratum, it is better to stick with
65 * setting WC in MTRR rather than using PAT on these CPUs.
67 * Enable PAT WC only on P4, Core 2 or later CPUs.
69 if (c->x86 > 0x6 || (c->x86 == 6 && c->x86_model >= 15))
72 pat_disable("PAT WC disabled due to known CPU erratum.");
76 case X86_VENDOR_CENTAUR:
77 case X86_VENDOR_TRANSMETA:
81 pat_disable("PAT disabled. Not yet verified on this CPU type.");