soc/intel/common/power_limit: Raise PsysPL1 when package PL1 is above TDP

When PL1 exceeds the SKU TDP, program MSR_PLATFORM_POWER_LIMIT (0x65c)
long-term (PsysPL1) to the same value.

This prevents the long-term system power from becoming a choke point
when raising the package PL1.

Change-Id: I85a604467ccbede84a668117ad588ac75b742a70
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91872
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Matt DeVillier 2026-03-25 14:02:29 -05:00
commit 976149a2f7

View file

@ -178,6 +178,20 @@ void set_power_limits(u8 power_limit_1_time,
MCHBAR32(MCH_PKG_POWER_LIMIT_LO) = limit.lo & (~(PKG_POWER_LIMIT_EN));
MCHBAR32(MCH_PKG_POWER_LIMIT_HI) = limit.hi;
/*
* Set PsysPL1 if PL1 is > TDP
* POR value for most SKUs is same as TDP, so adjust it accordingly.
*/
if (tdp_pl1 > tdp) {
limit = rdmsr(MSR_PLATFORM_POWER_LIMIT);
limit.lo = 0;
printk(BIOS_INFO, "CPU PsysPL1 = %u Watts\n", tdp_pl1 / power_unit);
limit.lo |= tdp_pl1 & PKG_POWER_LIMIT_MASK;
limit.lo |= PKG_POWER_LIMIT_CLAMP;
limit.lo |= PKG_POWER_LIMIT_EN;
wrmsr(MSR_PLATFORM_POWER_LIMIT, limit);
}
/* Set PsysPl2 */
if (conf->tdp_psyspl2) {
limit = rdmsr(MSR_PLATFORM_POWER_LIMIT);