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>
This commit is contained in:
Felix Singer 2021-05-03 02:33:15 +02:00 committed by Tim Wawrzynczak
parent c8fc542e1b
commit f9d7dc7ed3
1 changed files with 5 additions and 11 deletions

View File

@ -401,17 +401,11 @@ static void fill_fsps_chipset_lockdown_params(FSP_S_CONFIG *s_cfg,
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;