summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2023-03-23 17:00:06 +0100
committerLean Sheng Tan <sheng.tan@9elements.com>2023-03-24 16:40:01 +0000
commitff23f455c4affde98926c7a12d62ede4781b72b5 (patch)
tree8a6a92d5680b1bbdeee048e4a791a16bbe3848d5
parent56c1c4dff9c7ccd8968a3e32be800375bf3d5b78 (diff)
mb/prodrive/atlas: Configure some FSP settings
Program some FSP settings as requested by Prodrive. Change-Id: I04548e5eddc8a6be3a03b5dd9062470b4ef85adb Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/73949 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
-rw-r--r--src/mainboard/prodrive/atlas/Makefile.inc1
-rw-r--r--src/mainboard/prodrive/atlas/ramstage_fsp_params.c41
-rw-r--r--src/mainboard/prodrive/atlas/romstage_fsp_params.c12
3 files changed, 54 insertions, 0 deletions
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 <soc/ramstage.h>
+
+#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 <soc/romstage.h>
#include <soc/meminit.h>
+#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;