aboutsummaryrefslogtreecommitdiff
path: root/src/include/memlayout.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/memlayout.h')
-rw-r--r--src/include/memlayout.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/include/memlayout.h b/src/include/memlayout.h
index 03442970ad..899836c5f0 100644
--- a/src/include/memlayout.h
+++ b/src/include/memlayout.h
@@ -79,9 +79,11 @@
/* Use either CBFS_CACHE (unified) or both (PRERAM|POSTRAM)_CBFS_CACHE */
#define CBFS_CACHE(addr, size) REGION(cbfs_cache, addr, size, 4)
-/* TODO: This only works if you never access CBFS in romstage before RAM is up!
- * If you need to change that assumption, you have some work ahead of you... */
-#if defined(__PRE_RAM__) && !ENV_ROMSTAGE
+#if ENV_ROMSTAGE
+ #define PRERAM_CBFS_CACHE(addr, size) CBFS_CACHE(addr, size)
+ #define POSTRAM_CBFS_CACHE(addr, size) \
+ REGION(dram_cbfs_cache, addr, size, 4)
+#elif defined(__PRE_RAM__)
#define PRERAM_CBFS_CACHE(addr, size) CBFS_CACHE(addr, size)
#define POSTRAM_CBFS_CACHE(addr, size) \
REGION(unused_cbfs_cache, addr, size, 4)