3 * Routines to indentify additional cpu features that are scattered in
10 #include <asm/processor.h>
26 void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c)
30 const struct cpuid_bit *cb;
32 static const struct cpuid_bit cpuid_bits[] = {
33 { X86_FEATURE_IDA, CR_EAX, 1, 0x00000006 },
37 for (cb = cpuid_bits; cb->feature; cb++) {
39 /* Verify that the level is valid */
40 max_level = cpuid_eax(cb->level & 0xffff0000);
41 if (max_level < cb->level ||
42 max_level > (cb->level | 0xffff))
45 cpuid(cb->level, ®s[CR_EAX], ®s[CR_EBX],
46 ®s[CR_ECX], ®s[CR_EDX]);
48 if (regs[cb->reg] & (1 << cb->bit))
49 set_cpu_cap(c, cb->feature);
54 void __cpuinit validate_pat_support(struct cpuinfo_x86 *c)
56 switch (c->x86_vendor) {
58 if (c->x86 >= 0xf && c->x86 <= 0x11)
61 case X86_VENDOR_INTEL:
62 if (c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 15))
67 pat_disable(cpu_has_pat ?
68 "PAT disabled. Not yet verified on this CPU type." :
69 "PAT not supported by CPU.");