Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/43903 )
Change subject: cpu/intel/common: Report the CPU max speed in SMBIOS ......................................................................
cpu/intel/common: Report the CPU max speed in SMBIOS
Use the TSC frequency to provide the maximum processor speed in SMBIOS tables type 4. The TSC frequency is the "Maximum Non-Turbo Ratio" or "Scaleable Bus Speed" on older platforms, times the FSB.
Change-Id: I8030187d2c9714c7f6c9451fd2318b3c6608e431 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/cpu/intel/common/fsb.c 1 file changed, 15 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/43903/1
diff --git a/src/cpu/intel/common/fsb.c b/src/cpu/intel/common/fsb.c index 7772171..df2e51c 100644 --- a/src/cpu/intel/common/fsb.c +++ b/src/cpu/intel/common/fsb.c @@ -7,6 +7,7 @@ #include <console/console.h> #include <commonlib/helpers.h> #include <delay.h> +#include <smbios.h>
static u32 timer_fsb; static u32 timer_tsc; @@ -137,3 +138,17 @@ printk(BIOS_ERR, "FSB not supported or not found\n"); return -1; } + +#if CONFIG(GENERATE_SMBIOS_TABLES) +unsigned int smbios_cpu_get_max_speed_mhz(void) +{ + int ret, fsb, ratio; + + /* Return the Maximum Non-Turbo Ratio (R/O) */ + ret = get_fsb_tsc(&fsb, &ratio); + if (ret == 0) + return fsb * ratio; + + return 0; +} +#endif