summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorMartin Roth <martin@coreboot.org>2020-06-24 19:42:44 -0600
committerMartin Roth <martinroth@google.com>2020-07-08 20:46:05 +0000
commit95d05e43b1ccfd2bb6f540f30e0af4b930d93390 (patch)
tree7fbfe83236fdd2650e9214120f6ea7d01261e44f /src/soc
parent137f86149e37ff18b1837860aef1971eec06f0a1 (diff)
downloadcoreboot-95d05e43b1ccfd2bb6f540f30e0af4b930d93390.tar.xz
soc/amd/picasso: Halt if workbuf is absent after psp_verstage
Check for the workbuf in bootblock if psp_verstage is being used. BUG=b:158124527 TEST=Build & boot Trembyle with psp_verstage Signed-off-by: Martin Roth <martin@coreboot.org> Change-Id: I0ec8d2c953bce4c44cde5102d2765e0ab9b5875e Reviewed-on: https://review.coreboot.org/c/coreboot/+/42810 Reviewed-by: Raul Rangel <rrangel@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/amd/picasso/bootblock/bootblock.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/soc/amd/picasso/bootblock/bootblock.c b/src/soc/amd/picasso/bootblock/bootblock.c
index a3935cc7aa..556fbad5fc 100644
--- a/src/soc/amd/picasso/bootblock/bootblock.c
+++ b/src/soc/amd/picasso/bootblock/bootblock.c
@@ -13,6 +13,12 @@
#include <soc/i2c.h>
#include <amdblocks/amd_pci_mmconf.h>
#include <acpi/acpi.h>
+#include <security/vboot/symbols.h>
+
+/* vboot includes directory may not be in include path if vboot is not enabled */
+#if CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK)
+#include <2struct.h>
+#endif
asmlinkage void bootblock_resume_entry(void);
@@ -123,5 +129,15 @@ void bootblock_soc_init(void)
u32 val = cpuid_eax(1);
printk(BIOS_DEBUG, "Family_Model: %08x\n", val);
+#if CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK)
+ if (*(uint32_t *)_vboot2_work != VB2_SHARED_DATA_MAGIC) {
+ printk(BIOS_ERR, "ERROR: VBOOT workbuf not valid.\n");
+
+ printk(BIOS_DEBUG, "Signature: %#08x\n", *(uint32_t *)_vboot2_work);
+
+ die("Halting.\n");
+ }
+#endif
+
fch_early_init();
}