Skip to content

Commit

Permalink
x86: Fix override new_cpu_data.x86 with 486
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wang YanQing authored and H. Peter Anvin committed Jun 28, 2013
1 parent 62122fd commit 237d154
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/head_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ enable_paging:
/*
* Check if it is 486
*/
movb $4,X86 # at least 486
cmpl $-1,X86_CPUID
je is486

Expand Down Expand Up @@ -437,7 +438,6 @@ enable_paging:
movl %edx,X86_CAPABILITY

is486:
movb $4,X86
movl $0x50022,%ecx # set AM, WP, NE and MP
movl %cr0,%eax
andl $0x80000011,%eax # Save PG,PE,ET
Expand Down

0 comments on commit 237d154

Please sign in to comment.