diff options
| -rw-r--r-- | arch/x86/kernel/head_32.S | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index e3725a0f4327..2e8532e7c80a 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S | |||
| @@ -399,18 +399,7 @@ default_entry: | |||
| 399 | /* | 399 | /* |
| 400 | * Check if it is 486 | 400 | * Check if it is 486 |
| 401 | */ | 401 | */ |
| 402 | movl $-1,X86_CPUID # -1 for no CPUID initially | 402 | cmpl $-1,X86_CPUID |
| 403 | movb $4,X86 # at least 486 | ||
| 404 | pushfl # push EFLAGS | ||
| 405 | popl %eax # get EFLAGS | ||
| 406 | movl %eax,%ecx # save original EFLAGS | ||
| 407 | xorl $0x200000,%eax # flip ID bit in EFLAGS | ||
| 408 | pushl %eax # copy to EFLAGS | ||
| 409 | popfl # set EFLAGS | ||
| 410 | pushfl # get new EFLAGS | ||
| 411 | popl %eax # put it in eax | ||
| 412 | xorl %ecx,%eax # change in flags | ||
| 413 | testl $0x200000,%eax # check if ID bit changed | ||
| 414 | je is486 | 403 | je is486 |
| 415 | 404 | ||
| 416 | /* get vendor info */ | 405 | /* get vendor info */ |
| @@ -436,7 +425,9 @@ default_entry: | |||
| 436 | movb %cl,X86_MASK | 425 | movb %cl,X86_MASK |
| 437 | movl %edx,X86_CAPABILITY | 426 | movl %edx,X86_CAPABILITY |
| 438 | 427 | ||
| 439 | is486: movl $0x50022,%ecx # set AM, WP, NE and MP | 428 | is486: |
| 429 | movb $4,X86 | ||
| 430 | movl $0x50022,%ecx # set AM, WP, NE and MP | ||
| 440 | movl %cr0,%eax | 431 | movl %cr0,%eax |
| 441 | andl $0x80000011,%eax # Save PG,PE,ET | 432 | andl $0x80000011,%eax # Save PG,PE,ET |
| 442 | orl %ecx,%eax | 433 | orl %ecx,%eax |
