drivers/mrc_cache: Fix with VBOOT & VBOOT_STARTS_IN_ROMSTAGE
This guards code accessing the vboot context which does not exist if vboot starts after romstage. Change-Id: I2a38daa00d6d18df9c5e22858530814e23bb3e00 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/52157 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
This commit is contained in:
parent
58e1e0aee9
commit
70fe2707ba
|
@ -285,7 +285,8 @@ static int mrc_cache_find_current(int type, uint32_t version,
|
|||
* In recovery mode, force retraining if the memory retrain
|
||||
* switch is set.
|
||||
*/
|
||||
if (vboot_recovery_mode_enabled() && get_recovery_mode_retrain_switch())
|
||||
if (CONFIG(VBOOT_STARTS_IN_BOOTBLOCK) && vboot_recovery_mode_enabled()
|
||||
&& get_recovery_mode_retrain_switch())
|
||||
return -1;
|
||||
|
||||
cr = lookup_region(®ion, type);
|
||||
|
|
Loading…
Reference in New Issue