From ff23f455c4affde98926c7a12d62ede4781b72b5 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Thu, 23 Mar 2023 17:00:06 +0100 Subject: mb/prodrive/atlas: Configure some FSP settings Program some FSP settings as requested by Prodrive. Change-Id: I04548e5eddc8a6be3a03b5dd9062470b4ef85adb Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/73949 Tested-by: build bot (Jenkins) Reviewed-by: Lean Sheng Tan --- src/mainboard/prodrive/atlas/Makefile.inc | 1 + src/mainboard/prodrive/atlas/ramstage_fsp_params.c | 41 ++++++++++++++++++++++ src/mainboard/prodrive/atlas/romstage_fsp_params.c | 12 +++++++ 3 files changed, 54 insertions(+) create mode 100644 src/mainboard/prodrive/atlas/ramstage_fsp_params.c (limited to 'src/mainboard/prodrive') diff --git a/src/mainboard/prodrive/atlas/Makefile.inc b/src/mainboard/prodrive/atlas/Makefile.inc index 6c11876f35..b31f03a7fc 100644 --- a/src/mainboard/prodrive/atlas/Makefile.inc +++ b/src/mainboard/prodrive/atlas/Makefile.inc @@ -10,4 +10,5 @@ romstage-y += romstage_fsp_params.c ramstage-y += gpio.c ramstage-y += mainboard.c +ramstage-y += ramstage_fsp_params.c ramstage-y += smbios.c diff --git a/src/mainboard/prodrive/atlas/ramstage_fsp_params.c b/src/mainboard/prodrive/atlas/ramstage_fsp_params.c new file mode 100644 index 0000000000..e3c11e9127 --- /dev/null +++ b/src/mainboard/prodrive/atlas/ramstage_fsp_params.c @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include + +#include "vpd.h" + +void mainboard_silicon_init_params(FSP_S_CONFIG *params) +{ + /* Disable and lock configurable TDP */ + params->ApplyConfigTdp = 0; + params->ConfigTdpLock = 1; + + /* Apply profile-specific settings */ + switch (get_emi_eeprom_vpd()->profile) { + case ATLAS_PROF_REALTIME_PERFORMANCE: + params->Cx = 0; + params->C1e = 0; + params->C1StateUnDemotion = 0; + params->C1StateAutoDemotion = 0; + params->PkgCStateUnDemotion = 0; + params->PkgCStateLimit = 0; + + /* PCI */ + params->PchDmiAspmCtrl = 0; + params->PsfTccEnable = 1; + params->PchLegacyIoLowLatency = 1; + params->OpioRecenter = 0; + params->PsfTccEnable = 1; + params->RenderStandby = 0; + params->L2QosEnumerationEn = 1; + params->EnergyEfficientPState = 0; + params->EnergyEfficientTurbo = 0; + params->PchS0ixAutoDemotion = 0; + + /* Disable PMC low power modes */ + params->PmcLpmS0ixSubStateEnableMask = 0; + params->PmcV1p05PhyExtFetControlEn = 0; + params->PmcV1p05IsExtFetControlEn = 0; + break; + } +} diff --git a/src/mainboard/prodrive/atlas/romstage_fsp_params.c b/src/mainboard/prodrive/atlas/romstage_fsp_params.c index fedb298ee4..d460a05582 100644 --- a/src/mainboard/prodrive/atlas/romstage_fsp_params.c +++ b/src/mainboard/prodrive/atlas/romstage_fsp_params.c @@ -5,6 +5,8 @@ #include #include +#include "vpd.h" + static const struct mb_cfg ddr5_mem_config = { .type = MEM_TYPE_DDR5, @@ -46,6 +48,16 @@ void mainboard_memory_init_params(FSPM_UPD *memupd) memcfg_init(memupd, mem_config, &dimm_module_spd_info, half_populated); + /* Apply profile-specific settings */ + switch (get_emi_eeprom_vpd()->profile) { + case ATLAS_PROF_REALTIME_PERFORMANCE: + memupd->FspmConfig.HyperThreading = 0; + memupd->FspmConfig.DisPgCloseIdleTimeout = 1; + memupd->FspmConfig.PowerDownMode = 0; + memupd->FspmConfig.DisableStarv2medPrioOnNewReq = 1; + break; + } + /* Enable Audio */ memupd->FspmConfig.PchHdaAudioLinkHdaEnable = 1; memupd->FspmConfig.PchHdaSdiEnable[0] = 1; -- cgit v1.2.3