diff options
author | Mike Larkin <mlarkin@cvs.openbsd.org> | 2015-08-12 05:31:42 +0000 |
---|---|---|
committer | Mike Larkin <mlarkin@cvs.openbsd.org> | 2015-08-12 05:31:42 +0000 |
commit | 9cb4fdbd3d2a12afb5b5889944814ef58dec8371 (patch) | |
tree | 7a792d23b72d0b2af59d364b4a033b1c6b5ad65d /sys/arch | |
parent | de5eb97bbde3961be8f997632e49390ac369d39a (diff) |
Incorrect comparison when accessing cpuid extended function 0x80000007.
ok kettenis@, guenther@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/amd64/identcpu.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/identcpu.c b/sys/arch/amd64/amd64/identcpu.c index e074300642b..c0aa9409028 100644 --- a/sys/arch/amd64/amd64/identcpu.c +++ b/sys/arch/amd64/amd64/identcpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: identcpu.c,v 1.63 2015/07/21 03:38:22 reyk Exp $ */ +/* $OpenBSD: identcpu.c,v 1.64 2015/08/12 05:31:41 mlarkin Exp $ */ /* $NetBSD: identcpu.c,v 1.1 2003/04/26 18:39:28 fvdl Exp $ */ /* @@ -544,11 +544,12 @@ identifycpu(struct cpu_info *ci) #ifndef SMALL_KERNEL if (ci->ci_flags & CPUF_PRIMARY) { - if (pnfeatset > 0x80000007) { + if (!strcmp(cpu_vendor, "AuthenticAMD") && + pnfeatset >= 0x80000007) { CPUID(0x80000007, dummy, dummy, dummy, pnfeatset); if (pnfeatset & 0x06) { - if ((ci->ci_signature & 0xF00) == 0xf00) + if ((ci->ci_signature & 0xF00) == 0xF00) setperf_setup = k8_powernow_init; } if (ci->ci_family >= 0x10) |