summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorChristiano F. Haesbaert <haesbaert@cvs.openbsd.org>2012-01-08 14:39:27 +0000
committerChristiano F. Haesbaert <haesbaert@cvs.openbsd.org>2012-01-08 14:39:27 +0000
commit0bce62f14096709a0047d4a03d664e04498b5a7f (patch)
treefeb6528a0ec199f2e28c8bdeb5be5f47de860a6d /sys/arch
parent80ebcbad5b3a0cae68157248fd937fa973de5301 (diff)
Make sure we only read cpuid 0x80000001 features if pnfeatset reports it.
This is already done in i386. ok jsg "if there is no change to the flags in your dmesg"
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/amd64/identcpu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/identcpu.c b/sys/arch/amd64/amd64/identcpu.c
index c7b4d7c4562..8f99571c75b 100644
--- a/sys/arch/amd64/amd64/identcpu.c
+++ b/sys/arch/amd64/amd64/identcpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: identcpu.c,v 1.33 2011/12/26 23:07:04 haesbaert Exp $ */
+/* $OpenBSD: identcpu.c,v 1.34 2012/01/08 14:39:26 haesbaert Exp $ */
/* $NetBSD: identcpu.c,v 1.1 2003/04/26 18:39:28 fvdl Exp $ */
/*
@@ -309,9 +309,9 @@ identifycpu(struct cpu_info *ci)
CPUID(1, ci->ci_signature, val, dummy, ci->ci_feature_flags);
CPUID(0x80000000, pnfeatset, dummy, dummy, dummy);
- CPUID(0x80000001, dummy, dummy, dummy, ci->ci_feature_eflags);
if (pnfeatset >= 0x80000001)
- CPUID(0x80000001, dummy, dummy, ecpu_ecxfeature, dummy);
+ CPUID(0x80000001, dummy, dummy,
+ ecpu_ecxfeature, ci->ci_feature_eflags);
vendor[3] = 0;
CPUID(0, dummy, vendor[0], vendor[2], vendor[1]); /* yup, 0 2 1 */