summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/rules.h7
-rw-r--r--src/lib/fmap.c5
2 files changed, 9 insertions, 3 deletions
diff --git a/src/include/rules.h b/src/include/rules.h
index be72e9ea06..39836b11bf 100644
--- a/src/include/rules.h
+++ b/src/include/rules.h
@@ -274,6 +274,13 @@
#define ENV_USER_SPACE 0
#endif
+/* Define the first stage to run */
+#if CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK)
+#define ENV_INITIAL_STAGE ENV_SEPARATE_VERSTAGE
+#else
+#define ENV_INITIAL_STAGE ENV_BOOTBLOCK
+#endif
+
/**
* For pre-DRAM stages and post-CAR always build with simple device model, ie.
* PCI, PNP and CPU functions operate without use of devicetree. The reason
diff --git a/src/lib/fmap.c b/src/lib/fmap.c
index 671a962c25..e1e6a57a22 100644
--- a/src/lib/fmap.c
+++ b/src/lib/fmap.c
@@ -56,9 +56,8 @@ static void setup_preram_cache(struct mem_region_device *cache_mrdev)
}
struct fmap *fmap = (struct fmap *)_fmap_cache;
- if (!ENV_BOOTBLOCK) {
- /* NOTE: This assumes that for all platforms running this code,
- the bootblock is the first stage and the bootblock will make
+ if (!(ENV_INITIAL_STAGE)) {
+ /* NOTE: This assumes that the first stage will make
at least one FMAP access (usually from finding CBFS). */
if (!check_signature(fmap))
goto register_cache;