Timekeeping oddities on MacMini G4s

Hal Murray hmurray at megapathdsl.net
Wed Feb 1 17:59:32 AEDT 2017


Thanks.

benh at kernel.crashing.org said:
> Right, we just use the value provided by Open Firmware. Any chance you can
> try with MacOS X ? 

Not easily.  I'm using boxes from eBay.  They didn't come with CDs and I've 
already installed other software.


> From the value in the properties you showed me (and the ones I have in some
> DT snapshots) it looks like the value isn't fixed but somewhat calibrated by
> Open Firmware during boot. 

I rebooted several times.  It always got the exact same clock speed numbers.

I don't know anything about the insides of the PowerPC chip.  Can you confirm 
that the kernel time keeping works off an always ticking register similar to 
the Intel TSC and uses the timebase-frequency as the scale factor?

If so, I should be able to "fix" it from Open Firmware.  I tried that but 
things got worse.  I could easily have fatfingered something but more likely 
my reasoning for computing the right value was buggy.  I guess I'll try again.

I see that powerpc/kernel/time.c reads both timebase-frequency and 
clock-frequency, but doesn't seem to use clock-frequency.  Was that just a 
handy place to read it that got called before anybody else needed it?



-- 
These are my opinions.  I hate spam.





More information about the Linuxppc-dev mailing list