[OpenBIOS] (no subject)
Segher Boessenkool
segher at kernel.crashing.org
Sun Jun 8 10:41:03 CEST 2014
> The correct thing to do is similar to SPARC in that you create a 100Hz
> interrupt (possibly using the PPC decrementer?) that should increment a
> variable representing the number of ms elapsed. All you need to do is
> then point the new code towards that variable and it will handle
> get-msecs and milliseconds automatically.
>
> The interrupt routine is probably do-able in about 20 lines or less of
> PPC asm but it's beyond my current PPC-fu. It would be a good project
> for you though, and would probably fix the incorrect timing CIF
> milliseconds with -M mac99 :)
There is no reason at all to use the decrementer and interrupts, with
all the problems inherent in that; just use the timebase, it's what
it's for. The decrementer and timebase tick at the same frequency.
Segher
More information about the OpenBIOS
mailing list