Sridhar Siricilla has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/68899 )
Change subject: cpu/intel/common: typecast function agument to unint64_t ......................................................................
cpu/intel/common: typecast function agument to unint64_t
The patch add typecasting to the msr_unset_and_set() fuction argument to prevent it get converting to incorrect value. During unit testing, the argument is getting to changed to unexpected number which is resulting to an exception.
TEST= Verified the code on the Gimble. Noticed coreboot configured EPP value in the IA32_HWP_REQUEST.
Signed-off-by: Sridhar Siricilla sridhar.siricilla@intel.com Change-Id: I35d382c792b9df260381b7696f3bbff43d6c4dc2 --- M src/cpu/intel/common/common_init.c 1 file changed, 19 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/99/68899/1
diff --git a/src/cpu/intel/common/common_init.c b/src/cpu/intel/common/common_init.c index 4d6df84..d4395b5 100644 --- a/src/cpu/intel/common/common_init.c +++ b/src/cpu/intel/common/common_init.c @@ -223,5 +223,5 @@ void set_energy_perf_pref(u8 pref) { msr_unset_and_set(IA32_HWP_REQUEST, IA32_HWP_REQUEST_EPP_MASK, - pref << IA32_HWP_REQUEST_EPP_SHIFT); + uint64_t(pref << IA32_HWP_REQUEST_EPP_SHIFT)); }