From owner-freebsd-ppc@FreeBSD.ORG Tue Apr 8 14:41:49 2014 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF4C7126 for ; Tue, 8 Apr 2014 14:41:49 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 852611938 for ; Tue, 8 Apr 2014 14:41:49 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id BAF5EB926; Tue, 8 Apr 2014 10:41:46 -0400 (EDT) From: John Baldwin To: Alexey Dokuchaev Subject: Re: System clock falls behind quickly on Mac mini G4 Date: Tue, 8 Apr 2014 10:41:44 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <20140328071714.GA45961@regency.nsu.ru> <201404071704.58659.john@baldwin.cx> <20140408142929.GC39088@regency.nsu.ru> In-Reply-To: <20140408142929.GC39088@regency.nsu.ru> MIME-Version: 1.0 Message-Id: <201404081041.44272.jhb@freebsd.org> Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 08 Apr 2014 10:41:46 -0400 (EDT) Cc: freebsd-ppc@freebsd.org X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Apr 2014 14:41:49 -0000 On Tuesday, April 08, 2014 10:29:29 am Alexey Dokuchaev wrote: > On Mon, Apr 07, 2014 at 05:04:58PM -0400, John Baldwin wrote: > > Also, if the frequency is calibrated incorrectly during boot for some reason, > > your time-of-day clock will drift constantly. I've seen this on x86 boxes > > Yes, I remember a thread (x86ish) some time ago about bogus TSC calibration, > but... > > > where the TSC was calibrated incorrectly due to an interaction with SMM > > interrupts for legacy USB emulation. In that case, adjusting machdep.tsc_freq > > to match the frequency from the CPU's brand string "fixed" the drift. > > ... sysctl -a does not show machdep.tsc_freq for me on this G4 box for > some reason (GENERIC kernel). It wouldn't be tsc_freq on a powerpc box. You'd need to see what your timecounter is and what frequency it is using (kern.timecounter nodes) and see if that is adjustable. -- John Baldwin