movl $0x5555, %eax xorl %edx, %edx movl $2, %ecx clc divl %ecx jz you_have_NexGen_586 jmp you_have_i80386
movl $0x5555, %eax xorl %edx, %edx movl $2, %ecx clc divl %ecx jnc you_have_Cyrix_Or_Blue_Lightning jmp you_have_i80486Note: Cyrix M2 support cpuid instruction, and this routine is not executed on M2.
static volatile u_int trap_by_wrmsr; inthand_t bluetrap; asm (" .text _bluetrap: ss movl $0xa8c1d, _trap_by_wrmsr addl $2, (%esp) iret ");If we have Cyrix 486, 5x86 or 6x86, the variable trap_by_wrmsr will be change by this handler. Once Cyrix CPU is detected by this method, we will check device ID register to distinguish it.
If the CPU model is lower than 4, we may have i80486 class CPU including AMD 5x86. If it is 5, we have iPentium or iPentium OverDrive Processor. If it is 6, we have iPentium Pro Processor.
If CPU_BLUELIGHTNING_FPU_OP_CACHE is set, FP operand cache is enabled. Otherwise it is disabled. FP operand cache works only with Cyrix's FPU. If CPU_BLUELIGHTNING_3X is set and CPU supports triple clock mode, triple clock mode is enabled. Otherwise, CPU runs in double clock mode. The address in rages from 0 to 640KB and from 1 to 13MB is cacheable.