Skip to contentSkip to conversation

Update frequency of Time Base reg?

DISCUSSION Arrigo Benedetti 4 participants 7 messages Oct 8, 2004 – Oct 12, 2004

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
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

#2 lore raw
In reply to Arrigo Benedetti
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

#3 lore raw
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

#4 lore raw
Quoted 1 line

Look where in which device tree?

In the "timebase-frequency" property under any CPU node.

Segher

#5 lore raw
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.

#6 lore raw
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