Hung-Te Lin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36251 )
Change subject: soc/mediatek/mt8183: Force retraining memory if requested ......................................................................
soc/mediatek/mt8183: Force retraining memory if requested
To allow retraining memory without hotkey (for example in manufacturing process), we want to enforce re-training when the recovery reason is set to VB2_RECOVERY_TRAIN_AND_REBOOT (which can be done by running "crossystem recovery_request=0xc4").
On x86 (MRC cache) this is primarily used for ensuring RO calibration data is filled; and on MT8183 we have only RW calibration, but it seems totally fine to extend that to RW.
BRANCH=kukui BUG=None TEST=boots; crossystem recovery_reason=0xc4; reboot
Change-Id: Iaa5275f0e0eb90f6ab3a7d4579977a6655d59bd9 Signed-off-by: Hung-Te Lin hungte@chromium.org --- M src/soc/mediatek/mt8183/memory.c 1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/51/36251/1
diff --git a/src/soc/mediatek/mt8183/memory.c b/src/soc/mediatek/mt8183/memory.c index 2a4ebbd..b9ed619 100644 --- a/src/soc/mediatek/mt8183/memory.c +++ b/src/soc/mediatek/mt8183/memory.c @@ -169,7 +169,8 @@ /* Load calibration params from flash and run fast calibration */ if (recovery_mode) { printk(BIOS_WARNING, "Skip loading cached calibration data\n"); - if (vboot_recovery_mode_memory_retrain()) { + if (vboot_recovery_mode_memory_retrain() || + vboot_check_recovery_request() == VB2_RECOVERY_TRAIN_AND_REBOOT) { printk(BIOS_WARNING, "Retrain memory in next boot\n"); /* Use 0xFF as erased flash data. */ memset(dparam, 0xff, sizeof(*dparam));