summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-11-27 04:22:09 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-11-27 04:22:09 +0000
commit9e8fa8aa66615d8fc37a631718f7b0ef7aa257cc (patch)
tree9dc7e63972d5bb45525c910fcc7a576416a15c4d /sys/arch/i386
parenteaac84c72732319f83ed5960047de8e79ce96452 (diff)
Winchip c6 TSC is broken; wd@ics.nara-wu.ac.jp
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/machdep.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index f6227e677da..15ccc2d711a 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.119 1999/11/01 20:51:11 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.120 1999/11/27 04:22:08 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -267,6 +267,7 @@ int allowaperture = 0;
#endif
#endif
+void winchip_cpu_setup __P((const char *, int, int));
void cyrix6x86_cpu_setup __P((const char *, int, int));
void intel586_cpu_setup __P((const char *, int, int));
void intel686_cpu_setup __P((const char *, int, int));
@@ -816,7 +817,7 @@ struct cpu_cpuid_nameclass i386_cpuid_cpus[] = {
"WinChip 2", "WinChip 3", 0, 0, 0, 0, 0, 0,
"WinChip" /* Default */
},
- NULL
+ winchip_cpu_setup
},
/* Family 6, not yet available from IDT */
{
@@ -893,6 +894,23 @@ struct cpu_cpuid_feature i386_cpuid_features[] = {
};
void
+winchip_cpu_setup(cpu_device, model, step)
+ const char *cpu_device;
+ int model, step;
+{
+#if defined(I586_CPU)
+ extern int cpu_feature;
+
+ switch (model) {
+ case 4: /* WinChip C6 */
+ cpu_feature &= ~CPUID_TSC;
+ printf("%s: broken TSC disabled\n", cpu_device);
+ break;
+ }
+#endif
+}
+
+void
cyrix6x86_cpu_setup(cpu_device, model, step)
const char *cpu_device;
int model, step;