From owner-freebsd-current@FreeBSD.ORG Thu Jul 12 08:51:37 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D73B216A421; Thu, 12 Jul 2007 08:51:37 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.freebsd.org (Postfix) with SMTP id 11F9713C44B; Thu, 12 Jul 2007 08:51:36 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie ([134.226.81.10] helo=walton.maths.tcd.ie) by salmon.maths.tcd.ie with SMTP id ; 12 Jul 2007 09:51:36 +0100 (BST) Date: Thu, 12 Jul 2007 09:51:35 +0100 From: David Malone To: Ivan Voras Message-ID: <20070712085135.GA5332@walton.maths.tcd.ie> References: <20070709214216.GA72912@walton.maths.tcd.ie> <20070711132202.GA95487@walton.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i Sender: dwmalone@maths.tcd.ie Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Subject: Re: Debugging times X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2007 08:51:37 -0000 On Thu, Jul 12, 2007 at 12:14:43AM +0200, Ivan Voras wrote: > I've got interesting results (in the bad sense of the phrase): I do get > the message "Invalid time in real time clock. Check and reset the time > immediately" (the i386 message) BUT my time gets reset to 0 (midnight > 1970.) Ah - that's interesting. Could you look for the comment in src/sys/i386/isa/clock.c that says: /* Should we set dow = -1 because some clocks don't set it correctly? */ and add a line afterwards to say: ct.dow = -1; and see if that helps? > I see your patch and it shouldn't do that. Could it be a compiler bug, > so the effects change after trivial code has been changed? I think that without the patch, the clock is initialised using a chunk of uninitialised memory on the stack, which could result in all sorts of random values being used. With the patch, things may be a little more deterministic. David.