BACKPORT: x86: add TSC_CONSTANT_RATE option
authorAaron Durbin <adurbin@chromium.org>
Wed, 1 May 2013 20:27:09 +0000 (15:27 -0500)
committerChromeBot <chrome-bot@google.com>
Wed, 8 May 2013 18:19:05 +0000 (11:19 -0700)
commitf0243617293f1a304b6204b87532a46d1f055a9a
treea86fc7114cd78b2d0492eceeeb86fb1232ea504a
parent60a09eac23c1d7edc8ef76fec13b608a32d019b8
BACKPORT: x86: add TSC_CONSTANT_RATE option

Some boards use the local apic for udelay(), but they also provide
their own implementation of udelay() for SMM. The reason for using
the local apic for udelay() in ramstage is to not have to pay the
penalty of calibrating the TSC frequency. Therefore provide a
TSC_CONSTANT_RATE option to indicate that TSC calibration is not
needed. Instead rely on the presence of a tsc_freq_mhz() function
provided by the cpu/board.  Additionally, assume that if
TSC_CONSTANT_RATE is selected the udelay() function in SMM will
be the tsc.

BUG=None
BRANCH=None
TEST=Compiled and booted

Change-Id: Ic7096b7f5c9dec26a3f0441e6715fe02b15d44db
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/50453
Reviewed-by: Stefan Reinauer <reinauer@google.com>
src/cpu/x86/Kconfig
src/cpu/x86/tsc/Makefile.inc
src/cpu/x86/tsc/delay_tsc.c
src/include/cpu/x86/tsc.h