From owner-freebsd-bugs Fri Nov 2 14:10: 6 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 7DDD537B40C for ; Fri, 2 Nov 2001 14:10:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fA2MA1f59530; Fri, 2 Nov 2001 14:10:01 -0800 (PST) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 3F97237B408 for ; Fri, 2 Nov 2001 14:04:16 -0800 (PST) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fA2M4GN55990; Fri, 2 Nov 2001 14:04:16 -0800 (PST) (envelope-from nobody) Message-Id: <200111022204.fA2M4GN55990@freefall.freebsd.org> Date: Fri, 2 Nov 2001 14:04:16 -0800 (PST) From: Christian Ruppert To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: i386/31716: FreeBSD uses broken tsc timecounter by default Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 31716 >Category: i386 >Synopsis: FreeBSD uses broken tsc timecounter by default >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Nov 02 14:10:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Christian Ruppert >Release: FreeBSD4.3, security patches 01:42, 01:52, 01:53, 01:55 installed >Organization: - >Environment: FreeBSD arc.rezel.enst.fr 4.3-RELEASE FreeBSD 4.3-RELEASE #1: Fri Nov 2 21:15:39 CET 2001 root@arc.rezel.enst.fr:/usr/src/sys/compile/nevermind i386 >Description: although the kernel detects the cpu (AMD K5 model 0) correctly and thus (should) set tsc_is_broken = 1 in line 282 of i386/i386/identcpu.c it uses tsc as default timecounter. this results in a disfunctional system clock (since tsc is really broken at least on my k5 model 0) until you change the method using sysctl -w kern.timecounter.hardware=i8254. >How-To-Repeat: boot the kernel (without apm or smp support compiled in) on an AMD K5 model 0 machine and take a look at sysctl kern.timecounter.hardware. i expect similar behaviour using an IDT WinChip C6 since FreeBSD uses the same mechanism here (setting tsc_is_bromen = 1) however i could not verify this. >Fix: WORKAROUND: sysctl -w kern.timecounter.hardware=i8254 after booting. however this results in an offset (usually some seconds) of the system clock due to the period the broken timecounter was used. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message