From bf304319cf79936de8277c2899422e33c66b2f1f Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Fri, 11 Aug 2000 18:38:59 +0000 Subject: disable userland TCS access on winchip C6, it is busted; wd@ics.nara-wu.ac.jp --- sys/arch/i386/i386/machdep.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 93ed4997cb5..6aa789d730b 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.135 2000/07/06 00:59:00 todd Exp $ */ +/* $OpenBSD: machdep.c,v 1.136 2000/08/11 18:38:58 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -898,6 +898,9 @@ winchip_cpu_setup(cpu_device, model, step) switch (model) { case 4: /* WinChip C6 */ cpu_feature &= ~CPUID_TSC; + /* Disable RDTSC instruction from user-level. */ + lcr4(rcr4() | CR4_TSD); + printf("%s: broken TSC disabled\n", cpu_device); break; } -- cgit v1.2.3