summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRaul E Rangel <rrangel@chromium.org>2021-12-03 15:09:35 -0700
committerFelix Held <felix-coreboot@felixheld.de>2021-12-15 23:26:06 +0000
commit74d2218cc7c5b9d07528a2ffb3b727e52e688bd3 (patch)
tree8a51c2c6a449c99dd05c0cd80c18bfa07f9449a4 /src
parentd8f07c1f357ac92d33140450a7de0bae934141a2 (diff)
lib/cbfs: Disable cbfs_preload in romstage when VBOOT_STARTS_IN_ROMSTAGE
Preloading files before vboot runs and using them after vboot has finished will result in the wrong files getting used. Disable cbfs_preload to avoid this behavior. BUG=b:179699789 TEST=none Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: I7698b481a73fb24eecf4c810ff8be8b6826528ca Reviewed-on: https://review.coreboot.org/c/coreboot/+/59876 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src')
-rw-r--r--src/lib/cbfs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c
index d2a4b84656..5bbbe6a2ad 100644
--- a/src/lib/cbfs.c
+++ b/src/lib/cbfs.c
@@ -307,6 +307,10 @@ void cbfs_preload(const char *name)
if (!CONFIG(CBFS_PRELOAD))
dead_code();
+ /* We don't want to cross the vboot boundary */
+ if (ENV_ROMSTAGE && CONFIG(VBOOT_STARTS_IN_ROMSTAGE))
+ return;
+
DEBUG("%s(name='%s')\n", __func__, name);
if (_cbfs_boot_lookup(name, force_ro, &mdata, &rdev))