x86: Use symbolic MSR names
Use symbolic MSR names instead of hardcoding the MSR index. Signed-off-by: Brian Gerst <brgerst@gmail.com> LKML-Reference: <1279371808-24804-2-git-send-email-brgerst@gmail.com> Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
committed by
H. Peter Anvin
parent
8c06585d64
commit
cfaa71ee97
@ -104,7 +104,7 @@ _start:
|
|||||||
movl %eax, %ecx
|
movl %eax, %ecx
|
||||||
orl %edx, %ecx
|
orl %edx, %ecx
|
||||||
jz 1f
|
jz 1f
|
||||||
movl $0xc0000080, %ecx
|
movl $MSR_EFER, %ecx
|
||||||
wrmsr
|
wrmsr
|
||||||
1:
|
1:
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <asm/cpufeature.h>
|
#include <asm/cpufeature.h>
|
||||||
|
#include <asm/msr-index.h>
|
||||||
|
|
||||||
verify_cpu:
|
verify_cpu:
|
||||||
pushfl # Save caller passed flags
|
pushfl # Save caller passed flags
|
||||||
@ -88,7 +89,7 @@ verify_cpu_sse_test:
|
|||||||
je verify_cpu_sse_ok
|
je verify_cpu_sse_ok
|
||||||
test %di,%di
|
test %di,%di
|
||||||
jz verify_cpu_no_longmode # only try to force SSE on AMD
|
jz verify_cpu_no_longmode # only try to force SSE on AMD
|
||||||
movl $0xc0010015,%ecx # HWCR
|
movl $MSR_K7_HWCR,%ecx
|
||||||
rdmsr
|
rdmsr
|
||||||
btr $15,%eax # enable SSE
|
btr $15,%eax # enable SSE
|
||||||
wrmsr
|
wrmsr
|
||||||
|
Reference in New Issue
Block a user