Latest -CURRENT/i386 could not start under VirutalBox 4.1.18 and 4.2 (Windows host): hangs up after atrtc0 detection

Ian Lepore freebsd at damnhippie.dyndns.org
Wed Sep 19 21:51:42 UTC 2012


On Wed, 2012-09-19 at 14:30 -0700, Adrian Chadd wrote:
> On 19 September 2012 14:12, Ian Lepore <freebsd at damnhippie.dyndns.org> 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




More information about the freebsd-current mailing list