diff options
author | Gordon Willem Klok <gwk@cvs.openbsd.org> | 2007-09-30 17:50:21 +0000 |
---|---|---|
committer | Gordon Willem Klok <gwk@cvs.openbsd.org> | 2007-09-30 17:50:21 +0000 |
commit | 81a87170477ba97469f8b58ad71f0b493fbf98de (patch) | |
tree | d51af430ebbeb2ae26eb4b3ac3900011aaeda993 /sys/arch/i386 | |
parent | 3712bb1fff66fd5f5eb9b40c37651d38bf17c24c (diff) |
On i386, only call amd64_errata() on amd64 processors (family 0xf),
tested by krw@. This diff by itself is insufficient to ensure that
we are only running on an amd64: todd@'s machine is a mobile Athlon XP
that has a cpuid family of 0xf but is not an amd64 processor so more
must be done but this should prevent the vast majority of cases.
ok tom@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 49962050f41..39b623bf62a 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.407 2007/09/07 15:00:19 art Exp $ */ +/* $OpenBSD: machdep.c,v 1.408 2007/09/30 17:50:20 gwk Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -1308,6 +1308,7 @@ void amd_family6_setup(struct cpu_info *ci) { #if !defined(SMALL_KERNEL) && defined(I686_CPU) + int family = (ci->ci_signature >> 8) & 15; extern void (*pagezero)(void *, size_t); extern void sse2_pagezero(void *, size_t); extern void i686_pagezero(void *, size_t); @@ -1318,6 +1319,10 @@ amd_family6_setup(struct cpu_info *ci) pagezero = i686_pagezero; setperf_setup = amd_family6_setperf_setup; + + if (family == 0xf) { + amd64_errata(ci); + } #endif } @@ -1868,8 +1873,6 @@ identifycpu(struct cpu_info *ci) } else i386_use_fxsave = 0; - if (vendor == CPUVENDOR_AMD) - amd64_errata(ci); #endif /* I686_CPU */ } |