diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2018-12-18 21:11:10 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2018-12-18 21:11:10 +0000 |
commit | ea064182db9bc9501b5443eaf97a72b0323d8cf9 (patch) | |
tree | 7e4863247ed946129523dc5e08ec14fb59f118dc /sys/arch | |
parent | 46a4c9e8cbbc8284bde255751ae84b2287979658 (diff) |
Detection of MELTDOWN-proof Intel CPUs was broken: cpuid.07 has
subleafs, so to get SEFF0EDX_ARCH_CAP we have to clear %ecx too.
While here, delete a redundant cpuid.01 invocation.
problem noted and testing by tedu@
ok mlarkin@ deraadt@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/amd64/locore0.S | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/locore0.S b/sys/arch/amd64/amd64/locore0.S index 67f6f75ea99..424488bdb33 100644 --- a/sys/arch/amd64/amd64/locore0.S +++ b/sys/arch/amd64/amd64/locore0.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore0.S,v 1.9 2018/07/10 16:01:26 deraadt Exp $ */ +/* $OpenBSD: locore0.S,v 1.10 2018/12/18 21:11:09 guenther Exp $ */ /* $NetBSD: locore.S,v 1.13 2004/03/25 18:33:17 drochner Exp $ */ /* @@ -223,12 +223,11 @@ bi_size_ok: * Intel CPU, now check if IA32_ARCH_CAPABILITIES is supported and * if it says this CPU is safe. */ - movl $0x0, %eax - cpuid cmpl $0x7, %eax jl .Lcpu_check_finished movl $0x7, %eax + xorl %ecx,%ecx cpuid testl $SEFF0EDX_ARCH_CAP, %edx jz .Lcpu_check_finished |