Skip to content

Commit 237d154

Browse files
wyqkpH. Peter Anvin
authored andcommitted
x86: Fix override new_cpu_data.x86 with 486
We should set X86 to 486 before use cpuid to detect the cpu type, if we set X86 to 486 after cpuid, then we will get 486 until cpu_detect runs. Signed-off-by: Wang YanQing <udknight@gmail.com> Link: http://lkml.kernel.org/r/20130628144516.GA2177@udknight Acked-by: Borislav Petkov <bp@suse.de> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
1 parent 62122fd commit 237d154

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kernel/head_32.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ enable_paging:
410410
/*
411411
* Check if it is 486
412412
*/
413+
movb $4,X86 # at least 486
413414
cmpl $-1,X86_CPUID
414415
je is486
415416

@@ -437,7 +438,6 @@ enable_paging:
437438
movl %edx,X86_CAPABILITY
438439

439440
is486:
440-
movb $4,X86
441441
movl $0x50022,%ecx # set AM, WP, NE and MP
442442
movl %cr0,%eax
443443
andl $0x80000011,%eax # Save PG,PE,ET

0 commit comments

Comments
 (0)