diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2015-02-11 00:16:08 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2015-02-11 00:16:08 +0000 |
commit | 726644921ce6e28652d56d0f9e5eae595cf2e27a (patch) | |
tree | dabdedcb5ca71fcf79e74b24d553b5a9811568ae /sys | |
parent | 1f2a9d59071714f8c32bfb74a42378ddf2bdabcf (diff) |
zero ecx before cpuid(1), for some Cyrix processors do not really
support cpuid with other values than zero, and leave the ecx register
unchanged.
ok kettenis@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/i386/i386/locore.s | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s index 9fcfd84aa61..bb9e03249c4 100644 --- a/sys/arch/i386/i386/locore.s +++ b/sys/arch/i386/i386/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.149 2015/02/07 00:26:37 deraadt Exp $ */ +/* $OpenBSD: locore.s,v 1.150 2015/02/11 00:16:07 miod Exp $ */ /* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */ /*- @@ -398,6 +398,7 @@ try586: /* Use the `cpuid' instruction. */ movl $0, RELOC(_C_LABEL(cpu_vendor))+12 movl $1,%eax + xorl %ecx,%ecx cpuid movl %eax,RELOC(_C_LABEL(cpu_id)) # store cpu_id and features movl %ebx,RELOC(_C_LABEL(cpu_miscinfo)) |