aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/elkhartlake/fsp_params.c
diff options
context:
space:
mode:
authorWerner Zeh <werner.zeh@siemens.com>2022-11-21 13:21:04 +0100
committerFelix Held <felix-coreboot@felixheld.de>2023-01-11 21:05:32 +0000
commitadbdc5c1bdca62b567c8347e6189427304ee6409 (patch)
tree45b4c2936ab5234fe6713e097102c34956f29e00 /src/soc/intel/elkhartlake/fsp_params.c
parent7df8a69b264c5ed1c71c4691ab5e3f7024a92876 (diff)
soc/intel/elkhartlake: Provide a way to enable real-time tuning
Intel provides a Real-Time Tuning Guide for Elkhart Lake to improve real-time behaviour of the SoC (see Intel doc #640979). It describes, amongst knobs for the OS, a couple of firmware settings that need to be set properly to reduce latencies in all the subsystems. Things like clock and power gating as well as low power states for peripherals and buses are disabled in this scenario. This patch takes the mentioned UEFI parameters from the guide and translates them to FSP-M and FSP-S parameters. In addition, a chip config switch guards this tuning which can be selected on mainboard level if needed. When this real-time tuning is enabled, the overall system performance in a real-time environment can be increased by 2-3%. Change-Id: Ib524ddd675fb3ea270bacf8cd06cb628e895b4b6 Signed-off-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/71233 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Diffstat (limited to 'src/soc/intel/elkhartlake/fsp_params.c')
-rw-r--r--src/soc/intel/elkhartlake/fsp_params.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/soc/intel/elkhartlake/fsp_params.c b/src/soc/intel/elkhartlake/fsp_params.c
index 1466ee21a2..8d802f42be 100644
--- a/src/soc/intel/elkhartlake/fsp_params.c
+++ b/src/soc/intel/elkhartlake/fsp_params.c
@@ -307,10 +307,22 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd)
*/
params->EnableTcoTimer = 1;
- /* PCH Master Gating Control */
- params->PchPostMasterClockGating = 1;
- params->PchPostMasterPowerGating = 1;
-
+ /* Set up recommended real time parameters if real time tuning is enabled. */
+ if (config->realtime_tuning_enable) {
+ params->PchPostMasterClockGating = 0;
+ params->PchPostMasterPowerGating = 0;
+ params->PchPwrOptEnable = 0;
+ params->PsfTccEnable = 1;
+ params->PmcLpmS0ixSubStateEnableMask = 0;
+ params->PchDmiAspmCtrl = 0;
+ params->PchLegacyIoLowLatency = 0;
+ params->EnableItbm = 0;
+ params->D3ColdEnable = 0;
+ params->PmcOsIdleEnable = 0;
+ } else {
+ params->PchPostMasterClockGating = 1;
+ params->PchPostMasterPowerGating = 1;
+ }
/* HECI */
params->Heci3Enabled = config->Heci3Enable;
@@ -360,6 +372,8 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd)
params->PcieRpLtrMaxSnoopLatency[i] = 0x1003;
/* Virtual Channel 1 to Traffic Class mapping */
params->PcieRpVc1TcMap[i] = 0x60;
+ if (config->realtime_tuning_enable)
+ params->PcieRpEnableCpm[i] = 0;
}
/* SATA config */