1 /* Check if CPU has some minimum CPUID bits
2 This runs in 16bit mode so that the caller can still use the BIOS
3 to output errors on the screen */
4 #include <asm/cpufeature.h>
8 pushfl # Save caller passed flags
9 pushl $0 # Kill any dangerous flags
12 #if CONFIG_X86_MINIMUM_CPU_MODEL >= 4
15 orl $(1<<18),%eax # try setting AC
23 #if REQUIRED_MASK1 != 0
24 pushfl # standard way to check for cpuid
33 pushfl # standard way to check for cpuid
42 jz bad # REQUIRED_MASK1 != 0 requires CPUID
44 movl $0x0,%eax # See if cpuid 1 is implemented
49 #if REQUIRED_MASK1 & NEED_CMPXCHG64
50 /* Some VIA C3s need magic MSRs to enable CX64. Do this here */
51 cmpl $0x746e6543,%ebx # Cent
53 cmpl $0x48727561,%edx # aurH
55 cmpl $0x736c7561,%ecx # auls
57 movl $1,%eax # check model
62 cmp $6,%ebx # check family == 6
66 cmpl $6,%eax # check model >= 6
68 # assume models >= 6 all support this MSR
69 movl $MSR_VIA_FCR,%ecx
71 orl $((1<<1)|(1<<7)),%eax # enable CMPXCHG64 and PGE
75 movl $0x1,%eax # Does the cpu have what it takes
78 #if CONFIG_X86_MINIMUM_CPU_MODEL > 4
79 #error add proper model checking here
82 andl $REQUIRED_MASK1,%edx
83 xorl $REQUIRED_MASK1,%edx
85 #endif /* REQUIRED_MASK1 */