Joel Kitching has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39221 )
Change subject: vboot: Clean up pre-RAM use of vboot_recovery_mode_enabled() ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39221/2/src/drivers/mrc_cache/mrc_c... File src/drivers/mrc_cache/mrc_cache.c:
https://review.coreboot.org/c/coreboot/+/39221/2/src/drivers/mrc_cache/mrc_c... PS2, Line 522: if (!CONFIG(VBOOT_STARTS_IN_BOOTBLOCK)) What are the semantics of CONFIG(HAS_RECOVERY_MRC_CACHE)?
Couldn't we add a dependency on CONFIG(VBOOT_STARTS_IN_BOOTBLOCK) directly to that Kconfig option, and then disable CONFIG(HAS_RECOVERY_MRC_CACHE) on appropriate boards?
Way it stands currently: No way to know if recovery mode is enabled until verified boot is ran.
Unless I'm missing something -- hasn't this always been the case for non-manual recovery? So any MRC cache code relying on vboot_recovery_mode_enabled() prior to CB:38780 with CONFIG(VBOOT_STARTS_IN_ROMSTAGE) would be inconsistently choosing the recovery cache for manual recovery, and non-recovery cache for BROKEN recovery. This seems worse than just disallowing having two separate caches at all.