Proc/CpuInfo - Timebase

Jenkins, Clive Clive.Jenkins at xerox.com
Fri Jan 29 22:35:41 EST 2010


> On a powerpc system running linux, when I see cat /proc/cpuinfo, I
> find the value of timebase. Can somebody suggest on what is that, and
> how is it used?

It is the frequency (in Hz) of the clock that increments the Time Base
Register (TBR).

After reading TBR (or calculating a difference between two TBR values)
you can use "timebase" to convert to real time units, such as
microseconds/nanoseconds/picoseconds.

For debugging I log events together with a TBR reading, which I can
later convert to a time from reset (or a time from the moment when the
kernel initialised TBR to zero, which happens in some kernels).

Clive


More information about the Linuxppc-dev mailing list