diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/memlayout.h | 8 | ||||
-rw-r--r-- | src/include/symbols.h | 4 |
2 files changed, 9 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) diff --git a/src/include/symbols.h b/src/include/symbols.h index 52fea48578..bf875aed57 100644 --- a/src/include/symbols.h +++ b/src/include/symbols.h @@ -41,6 +41,10 @@ extern u8 _stack[]; extern u8 _estack[]; #define _stack_size (_estack - _stack) +extern u8 _dram_cbfs_cache[]; +extern u8 _edram_cbfs_cache[]; +#define _dram_cbfs_cache_size (_edram_cbfs_cache - _dram_cbfs_cache) + extern u8 _cbfs_cache[]; extern u8 _ecbfs_cache[]; #define _cbfs_cache_size (_ecbfs_cache - _cbfs_cache) |