From 976149a2f7aba4854b2d413aa36d6fc915bd3943 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Wed, 25 Mar 2026 14:02:29 -0500 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/91872 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- .../intel/common/block/power_limit/power_limit.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/soc/intel/common/block/power_limit/power_limit.c b/src/soc/intel/common/block/power_limit/power_limit.c index 167c8d7f73..aec631f6e4 100644 --- a/src/soc/intel/common/block/power_limit/power_limit.c +++ b/src/soc/intel/common/block/power_limit/power_limit.c @@ -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);