Patrick Georgi merged this change.

View Change

Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved
src/soc/intel/cannonlake: Add PsysPmax setting

This patch feeds PsysPmax setting to FSP through UPD and adds a
psys_pmax member in chip information so that we can set PsysPmax
through DT. The PsysPmax needs to be set correctly mapping to maximum
system power. Otherwise, system performance would be limited due to
the default PsysPmax setting in FSP is only 21W.

BUG=None
BRANCH=None
TEST=Set psys_pmax to an example value eg 101 in DT && put debug code
in FSP to print the PsysPmax value before sending to Pcode, ensure
the setting is correctly programmed.

Change-Id: Ia88ea17bc661a388c5b9bc3e59abc27c9f262977
Signed-off-by: Gaggery Tsai <gaggery.tsai@intel.com>
Reviewed-on: https://review.coreboot.org/c/31505
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
---
M src/soc/intel/cannonlake/chip.h
M src/soc/intel/cannonlake/fsp_params.c
2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/soc/intel/cannonlake/chip.h b/src/soc/intel/cannonlake/chip.h
index cb9ad38..1f26f1e 100644
--- a/src/soc/intel/cannonlake/chip.h
+++ b/src/soc/intel/cannonlake/chip.h
@@ -216,6 +216,8 @@
uint32_t tdp_psyspl3_dutycycle;
/* PL4 Value in Watts */
uint32_t tdp_pl4;
+ /* Estimated maximum platform power in Watts */
+ uint16_t psys_pmax;

/* Intel Speed Shift Technology */
uint8_t speed_shift_enable;
diff --git a/src/soc/intel/cannonlake/fsp_params.c b/src/soc/intel/cannonlake/fsp_params.c
index c276c86..a198f1b 100644
--- a/src/soc/intel/cannonlake/fsp_params.c
+++ b/src/soc/intel/cannonlake/fsp_params.c
@@ -88,6 +88,13 @@

mainboard_silicon_init_params(params);

+ /* Set PsysPmax if it is available from DT */
+ if (config->psys_pmax) {
+ printk(BIOS_DEBUG, "psys_pmax = %dW\n", config->psys_pmax);
+ /* PsysPmax is in unit of 1/8 Watt */
+ tconfig->PsysPmax = config->psys_pmax * 8;
+ }
+
/* Unlock upper 8 bytes of RTC RAM */
params->PchLockDownRtcMemoryLock = 0;


To view, visit change 31505. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia88ea17bc661a388c5b9bc3e59abc27c9f262977
Gerrit-Change-Number: 31505
Gerrit-PatchSet: 4
Gerrit-Owner: Gaggery Tsai <gaggery.tsai@intel.com>
Gerrit-Reviewer: Furquan Shaikh <furquan@google.com>
Gerrit-Reviewer: Gaggery Tsai <gaggery.tsai@intel.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged