diff options
-rw-r--r-- | src/mainboard/google/nyan/romstage.c | 3 | ||||
-rw-r--r-- | src/mainboard/google/nyan_big/romstage.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/mainboard/google/nyan/romstage.c b/src/mainboard/google/nyan/romstage.c index 7fb9570669..28827c8d5f 100644 --- a/src/mainboard/google/nyan/romstage.c +++ b/src/mainboard/google/nyan/romstage.c @@ -93,7 +93,8 @@ static void __attribute__((noinline)) romstage(void) mmu_config_range(dram_start, dram_size, DCACHE_WRITEBACK); mmu_config_range(CONFIG_DRAM_DMA_START >> 20, CONFIG_DRAM_DMA_SIZE >> 20, DCACHE_OFF); - mmu_config_range(dram_end, 4096 - dram_end, DCACHE_OFF); + if (dram_end < 4096) + mmu_config_range(dram_end, 4096 - dram_end, DCACHE_OFF); mmu_disable_range(0, 1); dcache_mmu_enable(); diff --git a/src/mainboard/google/nyan_big/romstage.c b/src/mainboard/google/nyan_big/romstage.c index c18138ae90..0fbe316882 100644 --- a/src/mainboard/google/nyan_big/romstage.c +++ b/src/mainboard/google/nyan_big/romstage.c @@ -93,7 +93,8 @@ static void __attribute__((noinline)) romstage(void) mmu_config_range(dram_start, dram_size, DCACHE_WRITEBACK); mmu_config_range(CONFIG_DRAM_DMA_START >> 20, CONFIG_DRAM_DMA_SIZE >> 20, DCACHE_OFF); - mmu_config_range(dram_end, 4096 - dram_end, DCACHE_OFF); + if (dram_end < 4096) + mmu_config_range(dram_end, 4096 - dram_end, DCACHE_OFF); mmu_disable_range(0, 1); dcache_mmu_enable(); |