Michał Żygowski has uploaded this change for review.

View Change

cpu/intel/model_206ax: Get CPU frequencies for SMBIOS type 4

Calculate the frequencies based on the appropriate MSRs adn pass them to
SMBIOS tables generator. Ivybridge microarchitecture does not yet
implement CPUID 16H leaf to obtain the required frequencies.

TEST=Intel Core i7-3770, TianoCore UEFI payload displays the CPU
frequency correctly equal 3.4GHz in Boot Manager Menu, dmidecode shows
correct frequencies according to Intel ARK, 3.4Ghz base and 3.9GHz turbo

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: Iefbae6111d39107eacac7e61654311646c6981eb
---
M src/cpu/intel/model_206ax/model_206ax_init.c
1 file changed, 20 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/58/47058/1
diff --git a/src/cpu/intel/model_206ax/model_206ax_init.c b/src/cpu/intel/model_206ax/model_206ax_init.c
index 7fb412c..2afbfee 100644
--- a/src/cpu/intel/model_206ax/model_206ax_init.c
+++ b/src/cpu/intel/model_206ax/model_206ax_init.c
@@ -18,6 +18,7 @@
#include "chip.h"
#include <cpu/intel/smm_reloc.h>
#include <cpu/intel/common/common.h>
+#include <smbios.h>

/*
* List of supported C-states in this processor
@@ -360,6 +361,25 @@
((perf_ctl.lo >> 8) & 0xff) * SANDYBRIDGE_BCLK);
}

+unsigned int smbios_cpu_get_max_speed_mhz(void)
+{
+ msr_t msr;
+ msr = rdmsr(MSR_TURBO_RATIO_LIMIT);
+ return (msr.lo & 0xff) * SANDYBRIDGE_BCLK;
+}
+
+unsigned int smbios_cpu_get_current_speed_mhz(void)
+{
+ msr_t msr;
+ msr = rdmsr(MSR_PLATFORM_INFO);
+ return ((msr.lo >> 8) & 0xff) * SANDYBRIDGE_BCLK;
+}
+
+unsigned int smbios_processor_external_clock(void)
+{
+ return SANDYBRIDGE_BCLK;
+}
+
static void configure_mca(void)
{
msr_t msr;

To view, visit change 47058. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iefbae6111d39107eacac7e61654311646c6981eb
Gerrit-Change-Number: 47058
Gerrit-PatchSet: 1
Gerrit-Owner: Michał Żygowski <michal.zygowski@3mdeb.com>
Gerrit-MessageType: newchange