From owner-freebsd-current@FreeBSD.ORG Wed Sep 19 21:51:42 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A5EA106566B; Wed, 19 Sep 2012 21:51:42 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from duck.symmetricom.us (duck.symmetricom.us [206.168.13.214]) by mx1.freebsd.org (Postfix) with ESMTP id D55768FC08; Wed, 19 Sep 2012 21:51:41 +0000 (UTC) Received: from damnhippie.dyndns.org (daffy.symmetricom.us [206.168.13.218]) by duck.symmetricom.us (8.14.5/8.14.5) with ESMTP id q8JLpe1P061303; Wed, 19 Sep 2012 15:51:40 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q8JLpcc7059131; Wed, 19 Sep 2012 15:51:38 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: Adrian Chadd In-Reply-To: References: <80840563.20120920002200@serebryakov.spb.ru> <1252171344.20120920003724@serebryakov.spb.ru> <1348087584.95562.55.camel@revolution.hippie.lan> <1859311530.20120920005449@serebryakov.spb.ru> <1348088706.95562.61.camel@revolution.hippie.lan> <1348089126.95562.62.camel@revolution.hippie.lan> Content-Type: text/plain; charset="us-ascii" Date: Wed, 19 Sep 2012 15:51:38 -0600 Message-ID: <1348091498.95562.66.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: lev@freebsd.org, freebsd-current@freebsd.org Subject: Re: Latest -CURRENT/i386 could not start under VirutalBox 4.1.18 and 4.2 (Windows host): hangs up after atrtc0 detection 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: Wed, 19 Sep 2012 21:51:42 -0000 On Wed, 2012-09-19 at 14:30 -0700, Adrian Chadd wrote: > On 19 September 2012 14:12, Ian Lepore wrote: > > >> Right. Being totally clueless, is atrc_start() called just at > >> probe/attach, or during normal operation? > >> > > > > It's called just once, from the attach() routine for the rtc device. > > Right. Just have it loop over say 100 times, with a 10us sleep between > each. Shouldn't that be enough? > If by "sleep" you mean any form of pausing or sleeping that waits for a given amount of time... remember when this code is running we're still in the process of trying to figure out which clocks can be used for such purposes. That leaves DELAY(), which does pretty much the equivelent of what the loop in question is doing. Hmmm, but DELAY() does have the advantage of busy-looping for a known amount of time, making it easier to constrain the time spent in the loop regardless of the speed of the cpu. I'll have to look into how DELAY() is implemented for x86 and see if it's usable in this context. -- Ian