Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46855 )
Change subject: mrc_cache: Move force memory retraining code into mrc_cache ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46855/2/src/drivers/mrc_cache/mrc_c... File src/drivers/mrc_cache/mrc_cache.c:
https://review.coreboot.org/c/coreboot/+/46855/2/src/drivers/mrc_cache/mrc_c... PS2, Line 72: .flags = NORMAL_FLAG | RECOVERY_FLAG,
I don't understand this check completely. The different combinations of platforms are: […]
Sorry, I just flipped stuff in my suggestion. It should have been
#if CONFIG(MRC_ALWAYS_RETRAIN_IN_RECOVERY) .flags = NORMAL_FLAG, #else .flags = NORMAL_FLAG | RECOVERY_FLAG, #endif
of course, i.e. the normal cache is *not* valid for recovery mode when ALWAYS_RETRAIN_IN_RECOVERY is set. With that, I think it should keep existing behavior?
However, it sounds like you think that the only thing that makes a difference in whether we want to always retrain or reuse the normal cache is where vboot runs? (You say "vboot before bootblock", but I think you meant "vboot in bootblock" vs. "vboot in romstage", right? Or "before bootblock" is a special case of "in bootblock", I guess.) If we're okay with tying this 1-to-1 to where vboot runs we can do that as well, then we wouldn't need an extra Kconfig.