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>
7 pushfl # Save caller passed flags
8 pushl $0 # Kill any dangerous flags
11 #if CONFIG_X86_MINIMUM_CPU_MODEL >= 4
13 orl $(1<<18),(%esp) # try setting AC
20 #if REQUIRED_MASK1 != 0
21 pushfl # standard way to check for cpuid
30 pushfl # standard way to check for cpuid
39 jz bad # REQUIRED_MASK1 != 0 requires CPUID
41 movl $0x0,%eax # See if cpuid 1 is implemented
46 movl $0x1,%eax # Does the cpu have what it takes
49 #if CONFIG_X86_MINIMUM_CPU_MODEL > 4
50 #error add proper model checking here
53 andl $REQUIRED_MASK1,%edx
54 xorl $REQUIRED_MASK1,%edx
56 #endif /* REQUIRED_MASK1 */