62,6 → 62,7 |
.globl SYMBOL_NAME(X86_is386) |
.globl SYMBOL_NAME(X86_isCyrix) |
.globl SYMBOL_NAME(X86_hasCPUID) |
.globl SYMBOL_NAME(X86_enable_cyrix_cpuid) |
|
SYMBOL_NAME_LABEL(X86_is386) |
pushfl |
83,6 → 84,65 |
movl $1, %eax |
ret |
|
SYMBOL_NAME_LABEL(X86_enable_cyrix_cpuid) |
|
pushfl |
cli |
/* Get Cyrix reg c3h */ |
movb $0xc3,%al |
outb %al,$0x22 |
inb $0x23,%al |
/* Enable config access */ |
movb %al,%cl |
movb %al,%bl |
andb $0xf,%bl |
orb $0x10,%bl |
/* Set Cyrix reg c3h */ |
movb $0xc3,%al |
outb %al,$0x22 |
movb %bl,%al |
outb %al,$0x23 |
/* Get Cyrix reg e8 */ |
movb $0xe8,%al |
outb %al,$0x22 |
inb $0x23,%al |
/* Set "CPUID" bit */ |
orb $0x80,%al |
movb %al,%bl |
/* Set Cyrix reg e8 */ |
movb $0xe8,%al |
outb %al,$0x22 |
movb %bl,%al |
outb %al,$0x23 |
/* Get Cyrix reg fe */ |
movb $0xfe,%al |
outb %al,$0x22 |
inb $0x23,%al |
/* Is CPU a 6x86(L)? */ |
andb $0xf0,%al |
cmpb $0x30,%al |
jne not6x86 |
/* Get Cyrix reg e9 */ |
movb $0xe9,%al |
outb %al,$0x22 |
inb $0x23,%al |
/* Fix 6x86 SLOP bug */ |
andb $0xfd,%al |
movb %al,%bl |
/* Set Cyrix reg e9 */ |
movb $0xe9,%al |
outb %al,$0x22 |
movb %bl,%al |
outb %al,$0x23 |
not6x86: |
/* Set Cyrix reg c3 */ |
movb $0xc3,%al |
outb %al,$0x22 |
movb %cl,%al |
outb %al,$0x23 |
popfl |
ret |
|
SYMBOL_NAME_LABEL(X86_hasCPUID) |
pushfl |
popl %eax |