Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46918 )
Change subject: cpu/intel/haswell: Enable turbo ratio if available
......................................................................
cpu/intel/haswell: Enable turbo ratio if available
Commit 7f28e4e (broadwell: Enable turbo ratio if available) is also
applicable to Haswell, since the MSR definitions are the same for both.
Change-Id: Ic5f30a5b06301449253bbfb9ed58c6b35a767763
Signed-off-by: Angel Pons <th3fanbus(a)gmail.com>
---
M src/cpu/intel/haswell/haswell_init.c
1 file changed, 7 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/18/46918/1
diff --git a/src/cpu/intel/haswell/haswell_init.c b/src/cpu/intel/haswell/haswell_init.c
index 6f483a5..4b927d7 100644
--- a/src/cpu/intel/haswell/haswell_init.c
+++ b/src/cpu/intel/haswell/haswell_init.c
@@ -547,7 +547,10 @@
perf_ctl.hi = 0;
/* Check for configurable TDP option */
- if (cpu_config_tdp_levels()) {
+ if (get_turbo_state() == TURBO_ENABLED) {
+ msr = rdmsr(MSR_TURBO_RATIO_LIMIT);
+ perf_ctl.lo = (msr.lo & 0xff) << 8;
+ } else if (cpu_config_tdp_levels()) {
/* Set to nominal TDP ratio */
msr = rdmsr(MSR_CONFIG_TDP_NOMINAL);
perf_ctl.lo = (msr.lo & 0xff) << 8;
@@ -606,9 +609,6 @@
/* Set energy policy */
set_energy_perf_bias(ENERGY_POLICY_NORMAL);
- /* Set Max Ratio */
- set_max_ratio();
-
/* Enable Turbo */
enable_turbo();
}
@@ -664,6 +664,9 @@
static void post_mp_init(void)
{
+ /* Set Max Ratio */
+ set_max_ratio();
+
/* Now that all APs have been relocated as well as the BSP let SMIs
* start flowing. */
global_smi_enable();
--
To view, visit https://review.coreboot.org/c/coreboot/+/46918
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ic5f30a5b06301449253bbfb9ed58c6b35a767763
Gerrit-Change-Number: 46918
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-MessageType: newchange
Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46912 )
Change subject: cpu/intel/haswell: Do not determine CPU type at runtime
......................................................................
cpu/intel/haswell: Do not determine CPU type at runtime
It is already known at compile-time.
Change-Id: I20303cd1f79b71268a9d734c85a1291afe9177e9
Signed-off-by: Angel Pons <th3fanbus(a)gmail.com>
---
M src/cpu/intel/haswell/haswell.h
M src/cpu/intel/haswell/haswell_init.c
2 files changed, 4 insertions(+), 24 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/12/46912/1
diff --git a/src/cpu/intel/haswell/haswell.h b/src/cpu/intel/haswell/haswell.h
index 0701332..deadbc5 100644
--- a/src/cpu/intel/haswell/haswell.h
+++ b/src/cpu/intel/haswell/haswell.h
@@ -145,8 +145,9 @@
int cpu_config_tdp_levels(void);
/* CPU identification */
-int haswell_family_model(void);
-int haswell_stepping(void);
-int haswell_is_ult(void);
+static inline int haswell_is_ult(void)
+{
+ return CONFIG(INTEL_LYNXPOINT_LP);
+}
#endif
diff --git a/src/cpu/intel/haswell/haswell_init.c b/src/cpu/intel/haswell/haswell_init.c
index 4b73c6a..15dcff5 100644
--- a/src/cpu/intel/haswell/haswell_init.c
+++ b/src/cpu/intel/haswell/haswell_init.c
@@ -186,27 +186,6 @@
[0x11] = 128,
};
-int haswell_family_model(void)
-{
- return cpuid_eax(1) & 0x0fff0ff0;
-}
-
-int haswell_stepping(void)
-{
- return cpuid_eax(1) & 0xf;
-}
-
-/* Dynamically determine if the part is ULT. */
-int haswell_is_ult(void)
-{
- static int ult = -1;
-
- if (ult < 0)
- ult = !!(haswell_family_model() == HASWELL_FAMILY_ULT);
-
- return ult;
-}
-
/* The core 100MHz BCLK is disabled in deeper c-states. One needs to calibrate
* the 100MHz BCLK against the 24MHz BCLK to restore the clocks properly
* when a core is woken up. */
--
To view, visit https://review.coreboot.org/c/coreboot/+/46912
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I20303cd1f79b71268a9d734c85a1291afe9177e9
Gerrit-Change-Number: 46912
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-MessageType: newchange