timestamp: add tick frequency to exported table

Hardware / Coreboot - Aaron Durbin [chromium.org] - 31 August 2015 08:55 UTC

Add the timestamp tick frequency within the timestamp table so the cbmem utility doesn't try to figure it out on its own. Those paths still exist for x86 systems which don't provide tsc_freq_mhz(). All other non-x86 systems use the monotonic timer which has a 1us granularity or 1MHz.

One of the main reasons is that Linux is reporting /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq as the true turbo frequency on turbo enables machines. This change also fixes the p-state values honored in cpufreq for turbo machines in that turbo p-pstates were reported as 100MHz greater than nominal.

BUG=chrome-os-partner:44669 BRANCH=firmware-strago-7287.B TEST=Built and booted on glados. Confirmed table frequency honored.

Change-Id: I763fe2d9a7b01d0ef5556e5abff36032062f5801

c49014e timestamp: add tick frequency to exported table
src/arch/x86/timestamp.c | 13 +++++++++++
src/include/cpu/x86/tsc.h | 3 +--
src/include/timestamp.h | 5 +++-
src/lib/timestamp.c | 10 ++++++++
util/cbmem/cbmem.c | 57 +++++++++++++++++++++++++--------------------
5 files changed, 60 insertions(+), 28 deletions(-)

Upstream: review.coreboot.org


  • Share