diff options
author | Christiano F. Haesbaert <haesbaert@cvs.openbsd.org> | 2012-04-22 19:36:10 +0000 |
---|---|---|
committer | Christiano F. Haesbaert <haesbaert@cvs.openbsd.org> | 2012-04-22 19:36:10 +0000 |
commit | d9c1a2b35c332cdd223d89a601f385835549f72c (patch) | |
tree | de9399139a23e5318da4173dcc4f33fed2f28d97 | |
parent | f46ab21badc0d7084d85f30f2d4e4db8c72651cc (diff) |
Test vendor against cpu_vendor instead of calling CPUID, this matches
the other uses.
ok mikeb@
-rw-r--r-- | sys/arch/amd64/amd64/identcpu.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/arch/amd64/amd64/identcpu.c b/sys/arch/amd64/amd64/identcpu.c index 77436353af2..ad53ca9078b 100644 --- a/sys/arch/amd64/amd64/identcpu.c +++ b/sys/arch/amd64/amd64/identcpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: identcpu.c,v 1.35 2012/03/27 02:23:04 haesbaert Exp $ */ +/* $OpenBSD: identcpu.c,v 1.36 2012/04/22 19:36:09 haesbaert Exp $ */ /* $NetBSD: identcpu.c,v 1.1 2003/04/26 18:39:28 fvdl Exp $ */ /* @@ -302,7 +302,6 @@ identifycpu(struct cpu_info *ci) u_int64_t last_tsc; u_int32_t dummy, val, pnfeatset; u_int32_t brand[12]; - u_int32_t vendor[4]; char mycpu_model[48]; int i, max; char *brandstr_from, *brandstr_to; @@ -433,11 +432,7 @@ identifycpu(struct cpu_info *ci) #endif - vendor[3] = 0; - CPUID(0, dummy, vendor[0], vendor[2], vendor[1]); /* yup, 0 2 1 */ - /* AuthenticAMD: h t u A i t n e */ - if (vendor[0] == 0x68747541 && vendor[1] == 0x69746e65 && - vendor[2] == 0x444d4163) /* DMAc */ + if (!strcmp(cpu_vendor, "AuthenticAMD")) amd64_errata(ci); if (strncmp(mycpu_model, "VIA Nano processor", 18) == 0) { |