Marshall Dawson has uploaded this change for review. ( https://review.coreboot.org/22938
Change subject: intel/cannonlake: Perform lockdown in bootstate after MRC write ......................................................................
intel/cannonlake: Perform lockdown in bootstate after MRC write
The bootstate where MRC data is written to flash is now variable. Make the lockdown procedure's timing variable too, and follow the write by one state.
Change-Id: I7e8776e216e2be9ba54a97dbd79b840806e12469 Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com --- M src/soc/intel/cannonlake/lockdown.c 1 file changed, 18 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/22938/1
diff --git a/src/soc/intel/cannonlake/lockdown.c b/src/soc/intel/cannonlake/lockdown.c index dba5901..d9f6da6 100644 --- a/src/soc/intel/cannonlake/lockdown.c +++ b/src/soc/intel/cannonlake/lockdown.c @@ -109,5 +109,21 @@ pmc_lockdown_cfg(config); }
-BOOT_STATE_INIT_ENTRY(BS_DEV_RESOURCES, BS_ON_EXIT, platform_lockdown_config, - NULL); +#define LOCKDOWN_BOOTSTATE (CONFIG_MRC_WRITE_BOOTSTATE + 1) + +#if LOCKDOWN_BOOTSTATE == 3 +BOOT_STATE_INIT_ENTRY(BS_DEV_RESOURCES, BS_ON_EXIT, + platform_lockdown_config, NULL); +#elif LOCKDOWN_BOOTSTATE == 4 +BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_EXIT, + platform_lockdown_config, NULL); +#elif LOCKDOWN_BOOTSTATE == 5 +BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_EXIT, + platform_lockdown_config, NULL); +#elif LOCKDOWN_BOOTSTATE == 6 +BOOT_STATE_INIT_ENTRY(BS_POST_DEVICE, BS_ON_EXIT, + platform_lockdown_config, NULL); +#elif LOCKDOWN_BOOTSTATE == 7 +BOOT_STATE_INIT_ENTRY(BS_OS_RESUME_CHECK, BS_ON_EXIT, + platform_lockdown_config, NULL); +#endif