summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/arch/x86/car.ld6
-rw-r--r--src/security/vboot/Makefile.inc8
2 files changed, 10 insertions, 4 deletions
diff --git a/src/arch/x86/car.ld b/src/arch/x86/car.ld
index 6fe8f14a21..2d835a3b46 100644
--- a/src/arch/x86/car.ld
+++ b/src/arch/x86/car.ld
@@ -26,9 +26,9 @@
. += 4096 * CONFIG_NUM_CAR_PAGE_TABLE_PAGES;
_epagetables = . ;
#endif
- /* Vboot work buffer is completely volatile outside of verstage and
- * romstage. Appropriate code needs to handle the transition. */
-#if IS_ENABLED(CONFIG_VBOOT_SEPARATE_VERSTAGE)
+ /* Vboot work buffer only needs to be available when verified boot
+ * starts in bootblock. */
+#if IS_ENABLED(CONFIG_VBOOT_STARTS_IN_BOOTBLOCK)
VBOOT2_WORK(., 16K)
#endif
/* Stack for CAR stages. Since it persists across all stages that
diff --git a/src/security/vboot/Makefile.inc b/src/security/vboot/Makefile.inc
index 6c63f7b393..0c32d94fab 100644
--- a/src/security/vboot/Makefile.inc
+++ b/src/security/vboot/Makefile.inc
@@ -22,7 +22,13 @@ ramstage-y += bootmode.c
verstage-y += bootmode.c
postcar-y += bootmode.c
-verstage-generic-ccopts += -D__PRE_RAM__ -D__VERSTAGE__
+# When VBOOT_STARTS_IN_ROMSTAGE is selected, DRAM is already up by
+# the time verstage runs.
+ifneq ($(CONFIG_VBOOT_STARTS_IN_ROMSTAGE),y)
+verstage-generic-ccopts += -D__PRE_RAM__
+endif
+
+verstage-generic-ccopts += -D__VERSTAGE__
ramstage-y += gbb.c