Tim Wawrzynczak has submitted this change. ( https://review.coreboot.org/c/coreboot/+/52846 )
Change subject: soc/intel/alderlake: Clean up FSP chipset lockdown configuration ......................................................................
soc/intel/alderlake: Clean up FSP chipset lockdown configuration
Use a variable to store if the FSP should be responsible for the chipset lockdown and use it for setting related configuration options. Thus, get rid of that if-else-clause.
Change-Id: Ia6485bde5b33af067dfb15ca410a164e288b76b2 Signed-off-by: Felix Singer felixsinger@posteo.net Reviewed-on: https://review.coreboot.org/c/coreboot/+/52846 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: Michael Niewöhner foss@mniewoehner.de --- M src/soc/intel/alderlake/fsp_params.c 1 file changed, 5 insertions(+), 11 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved Michael Niewöhner: Looks good to me, approved
diff --git a/src/soc/intel/alderlake/fsp_params.c b/src/soc/intel/alderlake/fsp_params.c index cb4552d..3accdbb 100644 --- a/src/soc/intel/alderlake/fsp_params.c +++ b/src/soc/intel/alderlake/fsp_params.c @@ -401,17 +401,11 @@ const struct soc_intel_alderlake_config *config) { /* Chipset Lockdown */ - if (get_lockdown_config() == CHIPSET_LOCKDOWN_COREBOOT) { - s_cfg->PchLockDownGlobalSmi = 0; - s_cfg->PchLockDownBiosInterface = 0; - s_cfg->PchUnlockGpioPads = 1; - s_cfg->RtcMemoryLock = 0; - } else { - s_cfg->PchLockDownGlobalSmi = 1; - s_cfg->PchLockDownBiosInterface = 1; - s_cfg->PchUnlockGpioPads = 0; - s_cfg->RtcMemoryLock = 1; - } + const bool lockdown_by_fsp = get_lockdown_config() == CHIPSET_LOCKDOWN_FSP; + s_cfg->PchLockDownGlobalSmi = lockdown_by_fsp; + s_cfg->PchLockDownBiosInterface = lockdown_by_fsp; + s_cfg->PchUnlockGpioPads = !lockdown_by_fsp; + s_cfg->RtcMemoryLock = lockdown_by_fsp;
/* coreboot will send EOP before loading payload */ s_cfg->EndOfPostMessage = EOP_DISABLE;