Attention is currently required from: Michał Kopeć.
Michał Żygowski has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/74402 )
Change subject: mb/msi/ms_7d25: Clear recovery request in mainboard_final ......................................................................
mb/msi/ms_7d25: Clear recovery request in mainboard_final
For ChromeOS platform the recovery reason is cleared in vb2api_kernel_phase2 which is probably not called by any non-ChromeOS system. It results in the platform being stuck in recovery mode, e.g. when RW firmware verification fails. Even if the RW partition is flashed with correctly signed image, the persistent non-zero recovery reason will prevent vboot from attempting the RW partition check.
Clear the recoveyr reason in the mainboard_final function. The call is made very late in the boot process thus it will not interfere with vboot logic. If still relevant, verstage will set the recovery reason back. The recovery reason will still be available in vboot workbuf in cbmem for the payload and OS. The additional reboot happening in the verstage when in recovery mode is a small disadvantage of this solution.
TEST=Boot with RW partition corrupted and then with RW partition valid. When it is corrupted, the platform stays in recovery mode, when becomes valid the platform boots from RW partition. Tested on MSI PRO Z690-A DDR4.
Signed-off-by: Michał Żygowski michal.zygowski@3mdeb.com Change-Id: I6c5444c2976fe5f68a2c6964710761c268d2255b --- M src/mainboard/msi/ms7d25/mainboard.c 1 file changed, 37 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/02/74402/1
diff --git a/src/mainboard/msi/ms7d25/mainboard.c b/src/mainboard/msi/ms7d25/mainboard.c index 539f897e..a5410e7 100644 --- a/src/mainboard/msi/ms7d25/mainboard.c +++ b/src/mainboard/msi/ms7d25/mainboard.c @@ -2,6 +2,7 @@
#include <acpi/acpi.h> #include <device/device.h> +#include <security/vboot/vboot_common.h> #include <soc/pci_devs.h> #include <soc/ramstage.h> #include <smbios.h> @@ -495,7 +496,14 @@ #endif }
+static void mainboard_final(void *chip_info) +{ + if (CONFIG(VBOOT)) + vboot_clear_recovery_request(); +} + struct chip_operations mainboard_ops = { .init = mainboard_init, .enable_dev = mainboard_enable, + .final = mainboard_final, };