Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46921 )
Change subject: cpu/intel/haswell: Add fast ramp voltage for Broadwell ......................................................................
cpu/intel/haswell: Add fast ramp voltage for Broadwell
Backport commit 55228ba (broadwell: Changes from 2.2.0 ref code) to Haswell, to eventually migrate Broadwell to use the same Haswell code.
Change-Id: I03d9ff16bcaab9091bd723ce933aa3f2d71e29b9 Signed-off-by: Angel Pons th3fanbus@gmail.com --- M src/cpu/intel/haswell/haswell.h M src/cpu/intel/haswell/haswell_init.c 2 files changed, 11 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/46921/1
diff --git a/src/cpu/intel/haswell/haswell.h b/src/cpu/intel/haswell/haswell.h index 2352489..d02cba6 100644 --- a/src/cpu/intel/haswell/haswell.h +++ b/src/cpu/intel/haswell/haswell.h @@ -3,6 +3,7 @@ #ifndef _CPU_INTEL_HASWELL_H #define _CPU_INTEL_HASWELL_H
+#include <arch/cpu.h> #include <stdint.h>
/* CPU types without stepping */ @@ -147,6 +148,11 @@ int cpu_config_tdp_levels(void);
/* CPU identification */ +static inline u32 cpu_family_model(void) +{ + return cpuid_eax(1) & 0x0fff0ff0; +} + static inline int haswell_is_ult(void) { return CONFIG(INTEL_LYNXPOINT_LP); diff --git a/src/cpu/intel/haswell/haswell_init.c b/src/cpu/intel/haswell/haswell_init.c index 5838f1f..7edb663 100644 --- a/src/cpu/intel/haswell/haswell_init.c +++ b/src/cpu/intel/haswell/haswell_init.c @@ -315,8 +315,11 @@ msr = rdmsr(MSR_VR_MISC_CONFIG2); msr.lo &= ~0xffff; /* Allow CPU to control minimum voltage completely (15:8) and - * set the fast ramp voltage to 1110mV (0x6f in 10mV steps). */ - msr.lo |= 0x006f; + set the fast ramp voltage in 10mV steps. */ + if (cpu_family_model() == BROADWELL_FAMILY_ULT) + msr.lo |= 0x006a; /* 1.56V */ + else + msr.lo |= 0x006f; /* 1.60V */ wrmsr(MSR_VR_MISC_CONFIG2, msr); }
Hello build bot (Jenkins), Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46921
to look at the new patch set (#6).
Change subject: cpu/intel/haswell: Add fast ramp voltage for Broadwell ......................................................................
cpu/intel/haswell: Add fast ramp voltage for Broadwell
Backport commit 55228ba (broadwell: Changes from 2.2.0 ref code) to Haswell, to eventually migrate Broadwell to use the same Haswell code.
Change-Id: I03d9ff16bcaab9091bd723ce933aa3f2d71e29b9 Signed-off-by: Angel Pons th3fanbus@gmail.com --- M src/cpu/intel/haswell/haswell.h M src/cpu/intel/haswell/haswell_init.c 2 files changed, 11 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/46921/6
Hello build bot (Jenkins), Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46921
to look at the new patch set (#11).
Change subject: cpu/intel/haswell: Add fast ramp voltage for Broadwell ......................................................................
cpu/intel/haswell: Add fast ramp voltage for Broadwell
Backport commit 55228ba4b4 (broadwell: Changes from 2.2.0 ref code) to Haswell, to eventually migrate Broadwell to use the same Haswell code.
Change-Id: I03d9ff16bcaab9091bd723ce933aa3f2d71e29b9 Signed-off-by: Angel Pons th3fanbus@gmail.com --- M src/cpu/intel/haswell/haswell.h M src/cpu/intel/haswell/haswell_init.c 2 files changed, 11 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/46921/11
Attention is currently required from: Angel Pons. Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46921 )
Change subject: cpu/intel/haswell: Add fast ramp voltage for Broadwell ......................................................................
Patch Set 15:
(1 comment)
File src/cpu/intel/haswell/haswell.h:
https://review.coreboot.org/c/coreboot/+/46921/comment/b04edc8d_a0d91d7e PS15, Line 172: static inline u32 cpu_family_model(void) : { : return cpuid_eax(1) & 0x0fff0ff0; : } get_fms() more or less does that.
Attention is currently required from: Arthur Heymans. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46921 )
Change subject: cpu/intel/haswell: Add fast ramp voltage for Broadwell ......................................................................
Patch Set 15:
(1 comment)
File src/cpu/intel/haswell/haswell.h:
https://review.coreboot.org/c/coreboot/+/46921/comment/63f05c7e_c9399747 PS15, Line 172: static inline u32 cpu_family_model(void) : { : return cpuid_eax(1) & 0x0fff0ff0; : }
get_fms() more or less does that.
It does way more than I need, though.
Attention is currently required from: Angel Pons. Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46921 )
Change subject: cpu/intel/haswell: Add fast ramp voltage for Broadwell ......................................................................
Patch Set 15: Code-Review+2
(1 comment)
File src/cpu/intel/haswell/haswell.h:
https://review.coreboot.org/c/coreboot/+/46921/comment/b8bedb17_6639f744 PS15, Line 172: static inline u32 cpu_family_model(void) : { : return cpuid_eax(1) & 0x0fff0ff0; : }
It does way more than I need, though.
Done. LGTM and worry about it later.
Angel Pons has submitted this change. ( https://review.coreboot.org/c/coreboot/+/46921 )
Change subject: cpu/intel/haswell: Add fast ramp voltage for Broadwell ......................................................................
cpu/intel/haswell: Add fast ramp voltage for Broadwell
Backport commit 55228ba4b4 (broadwell: Changes from 2.2.0 ref code) to Haswell, to eventually migrate Broadwell to use the same Haswell code.
Change-Id: I03d9ff16bcaab9091bd723ce933aa3f2d71e29b9 Signed-off-by: Angel Pons th3fanbus@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/46921 Reviewed-by: Arthur Heymans arthur@aheymans.xyz Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/cpu/intel/haswell/haswell.h M src/cpu/intel/haswell/haswell_init.c 2 files changed, 11 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Arthur Heymans: Looks good to me, approved
diff --git a/src/cpu/intel/haswell/haswell.h b/src/cpu/intel/haswell/haswell.h index cb602ce..e45acd5 100644 --- a/src/cpu/intel/haswell/haswell.h +++ b/src/cpu/intel/haswell/haswell.h @@ -3,6 +3,7 @@ #ifndef _CPU_INTEL_HASWELL_H #define _CPU_INTEL_HASWELL_H
+#include <arch/cpu.h> #include <stdint.h>
/* CPU types without stepping */ @@ -168,6 +169,11 @@ int cpu_config_tdp_levels(void);
/* CPU identification */ +static inline u32 cpu_family_model(void) +{ + return cpuid_eax(1) & 0x0fff0ff0; +} + static inline int haswell_is_ult(void) { return CONFIG(INTEL_LYNXPOINT_LP); diff --git a/src/cpu/intel/haswell/haswell_init.c b/src/cpu/intel/haswell/haswell_init.c index 9881bb8..b1f8bba 100644 --- a/src/cpu/intel/haswell/haswell_init.c +++ b/src/cpu/intel/haswell/haswell_init.c @@ -294,8 +294,11 @@ msr = rdmsr(MSR_VR_MISC_CONFIG2); msr.lo &= ~0xffff; /* Allow CPU to control minimum voltage completely (15:8) and - * set the fast ramp voltage to 1110mV (0x6f in 10mV steps). */ - msr.lo |= 0x006f; + set the fast ramp voltage in 10mV steps. */ + if (cpu_family_model() == BROADWELL_FAMILY_ULT) + msr.lo |= 0x006a; /* 1.56V */ + else + msr.lo |= 0x006f; /* 1.60V */ wrmsr(MSR_VR_MISC_CONFIG2, msr); }