Update frequency of Time Base reg?
Dear all,
I'm looking for information about the update frequency of the Time Base register for the latest dual G5 Powermac and Xserve models.
By the way, what is the best way to find this kind of information?
Thanks,
-Arrigo
Quoted 5 lines · Arrigo Benedetti
Dear all,
I'm looking for information about the update frequency of the Time Base register for the latest dual G5 Powermac and Xserve models.
By the way, what is the best way to find this kind of information?
33.3 MHz, I think.
The most portable way to find it is to calibrate it against gettimeofday(). For our product kernels, I've exported it via /proc.
Chris
Quoted 3 lines
I'm looking for information about the update frequency of the Time Base register for the latest dual G5 Powermac and Xserve models.
By the way, what is the best way to find this kind of information?
Look in the device-tree.
Segher
Quoted 6 lines · Segher Boessenkool
Quoted 3 lines
I'm looking for information about the update frequency of the Time Base register for the latest dual G5 Powermac and Xserve models.
By the way, what is the best way to find this kind of information?Look in the device-tree.
Look where in which device tree?
dmesg shows it, but I wasn't aware of any reliable way to get it from userspace on all ppc boxes.
Chris
Quoted 1 line
Look where in which device tree?
In the "timebase-frequency" property under any CPU node.
Segher
Quoted 3 lines · Segher Boessenkool
Quoted 1 line
Look where in which device tree?
In the "timebase-frequency" property under any CPU node.
so e.g. in /proc/device-tree/cpus/PowerPC,G4/timebase-frequency.
Jon.
Quoted 1 line · Jon Masters
so e.g. in
/proc/device-tree/cpus/PowerPC,G4/timebase-frequency.
Interesting. Learn something new....
Just took a look at the code, and there are apparently some machines on which this is flaky. To use this in userspace you'd want to account for that, and probably you'd want a backup calibration as well.
Chris