summaryrefslogtreecommitdiff
path: root/src/include/memlayout.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/memlayout.h')
-rw-r--r--src/include/memlayout.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/include/memlayout.h b/src/include/memlayout.h
index a68b21f4d6..b39a8955c9 100644
--- a/src/include/memlayout.h
+++ b/src/include/memlayout.h
@@ -153,7 +153,10 @@
STR(Verstage exceeded its allotted size! (sz))); \
INCLUDE "verstage/lib/program.ld"
- #define OVERLAP_VERSTAGE_ROMSTAGE(addr, size) VERSTAGE(addr, size)
+ #define OVERLAP_VERSTAGE_ROMSTAGE(addr, size) \
+ _ = ASSERT(IS_ENABLED(CONFIG_RETURN_FROM_VERSTAGE) == 1, \
+ "Must set RETURN_FROM_VERSTAGE to overlap romstage."); \
+ VERSTAGE(addr, size)
#else
#define VERSTAGE(addr, sz) \
REGION(verstage, addr, sz, 1)