Michał Żygowski has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47058 )
Change subject: cpu/intel/model_206ax: Get CPU frequencies for SMBIOS type 4 ......................................................................
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;
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47058 )
Change subject: cpu/intel/model_206ax: Get CPU frequencies for SMBIOS type 4 ......................................................................
Patch Set 1: Code-Review+2
(3 comments)
https://review.coreboot.org/c/coreboot/+/47058/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47058/1//COMMIT_MSG@9 PS1, Line 9: adn nit: and
https://review.coreboot.org/c/coreboot/+/47058/1//COMMIT_MSG@10 PS1, Line 10: Ivybridge microarchitecture does not yet : implement CPUID 16H leaf What do you mean?
https://review.coreboot.org/c/coreboot/+/47058/1//COMMIT_MSG@15 PS1, Line 15: Ghz nit: GHz
Michał Żygowski has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47058 )
Change subject: cpu/intel/model_206ax: Get CPU frequencies for SMBIOS type 4 ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47058/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47058/1//COMMIT_MSG@10 PS1, Line 10: Ivybridge microarchitecture does not yet : implement CPUID 16H leaf
What do you mean?
It means it is implemented by newer microarchitectures and the coreboot SMBIOS generator uses these CPUIDs to fill the fields of type4 entry by default.
Hello build bot (Jenkins), Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47058
to look at the new patch set (#2).
Change subject: cpu/intel/model_206ax: Get CPU frequencies for SMBIOS type 4 ......................................................................
cpu/intel/model_206ax: Get CPU frequencies for SMBIOS type 4
Calculate the frequencies based on the appropriate MSRs and 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/2
Michał Żygowski has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47058 )
Change subject: cpu/intel/model_206ax: Get CPU frequencies for SMBIOS type 4 ......................................................................
Patch Set 2:
(2 comments)
https://review.coreboot.org/c/coreboot/+/47058/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47058/1//COMMIT_MSG@9 PS1, Line 9: adn
nit: and
Done
https://review.coreboot.org/c/coreboot/+/47058/1//COMMIT_MSG@15 PS1, Line 15: Ghz
nit: GHz
Done
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47058 )
Change subject: cpu/intel/model_206ax: Get CPU frequencies for SMBIOS type 4 ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47058/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47058/1//COMMIT_MSG@10 PS1, Line 10: Ivybridge microarchitecture does not yet : implement CPUID 16H leaf
It means it is implemented by newer microarchitectures and the coreboot SMBIOS generator uses these […]
Ack
Patrick Georgi has uploaded a new patch set (#3) to the change originally created by Michał Żygowski. ( https://review.coreboot.org/c/coreboot/+/47058 )
Change subject: cpu/intel/model_206ax: Get CPU frequencies for SMBIOS type 4 ......................................................................
cpu/intel/model_206ax: Get CPU frequencies for SMBIOS type 4
Calculate the frequencies based on the appropriate MSRs and pass them to SMBIOS tables generator. Ivybridge microarchitecture does not yet implement CPUID 16H leaf used 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/3
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/47058 )
Change subject: cpu/intel/model_206ax: Get CPU frequencies for SMBIOS type 4 ......................................................................
cpu/intel/model_206ax: Get CPU frequencies for SMBIOS type 4
Calculate the frequencies based on the appropriate MSRs and pass them to SMBIOS tables generator. Ivybridge microarchitecture does not yet implement CPUID 16H leaf used 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/47058 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/cpu/intel/model_206ax/model_206ax_init.c 1 file changed, 20 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
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;