diff options
Diffstat (limited to 'src/soc/amd/picasso/bootblock')
-rw-r--r-- | src/soc/amd/picasso/bootblock/bootblock.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/soc/amd/picasso/bootblock/bootblock.c b/src/soc/amd/picasso/bootblock/bootblock.c index 470002789f..a450544b0d 100644 --- a/src/soc/amd/picasso/bootblock/bootblock.c +++ b/src/soc/amd/picasso/bootblock/bootblock.c @@ -17,6 +17,7 @@ #include <amdblocks/amd_pci_mmconf.h> #include <acpi/acpi.h> #include <security/vboot/symbols.h> +#include <security/vboot/vbnv.h> /* vboot includes directory may not be in include path if vboot is not enabled */ #if CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK) @@ -134,10 +135,17 @@ void bootblock_soc_init(void) #if CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK) if (*(uint32_t *)_vboot2_work != VB2_SHARED_DATA_MAGIC) { - printk(BIOS_ERR, "ERROR: VBOOT workbuf not valid.\n"); + /* + * If the system has already been rebooted once, but still returns here, + * instead of rebooting to verstage again, assume that the system is in + * a reboot loop, so halt instead. + */ + if ((!vbnv_cmos_failed()) && cmos_read(CMOS_RECOVERY_BYTE) == + CMOS_RECOVERY_MAGIC_VAL) + die("Error: Reboot into recovery was unsuccessful. Halting."); + printk(BIOS_ERR, "ERROR: VBOOT workbuf not valid.\n"); printk(BIOS_DEBUG, "Signature: %#08x\n", *(uint32_t *)_vboot2_work); - cmos_init(0); cmos_write(CMOS_RECOVERY_MAGIC_VAL, CMOS_RECOVERY_BYTE); warm_reset(); |