From 713f17de1a768b53bb80b30d52c047f8b3c151dd Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Sun, 24 Apr 2016 22:50:20 +0100 Subject: sun50i: mmap: dont map the whole device area, exclude SRAM If we soon run in SRAM, the memory mapping code maps .text & friends anyway, so we can confine the device mapping to the actual memory region used by devices. We exclude the SRAM/BROM regions. Signed-off-by: Andre Przywara --- plat/sun50iw1p1/aarch64/sunxi_common.c | 5 +++-- plat/sun50iw1p1/include/platform_def.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'plat') diff --git a/plat/sun50iw1p1/aarch64/sunxi_common.c b/plat/sun50iw1p1/aarch64/sunxi_common.c index 1e4dd3c..da5ed3d 100644 --- a/plat/sun50iw1p1/aarch64/sunxi_common.c +++ b/plat/sun50iw1p1/aarch64/sunxi_common.c @@ -56,8 +56,9 @@ plat_config_t plat_config; */ const mmap_region_t sunxi_mmap[] = { - //1G - { 0, 0, DRAM1_BASE, MT_DEVICE | MT_RW | MT_SECURE }, + // MMI/O region used by peripherals from 0x100.0000 to 0x200.0000 + { 0x1000000, 0x1000000, + 0x1000000, MT_DEVICE | MT_RW | MT_SECURE }, //2G { DRAM1_BASE, DRAM1_BASE, SUNXI_MAX_DRAM_SIZE, MT_MEMORY | MT_RW | MT_NS}, //TRUSTED dram for secure os and shared memory diff --git a/plat/sun50iw1p1/include/platform_def.h b/plat/sun50iw1p1/include/platform_def.h index 45b79e7..fc9d798 100644 --- a/plat/sun50iw1p1/include/platform_def.h +++ b/plat/sun50iw1p1/include/platform_def.h @@ -86,7 +86,7 @@ * Platform specific page table and MMU setup constants ******************************************************************************/ #define ADDR_SPACE_SIZE (1ull << 32) -#define MAX_XLAT_TABLES 2 +#define MAX_XLAT_TABLES 4 #define MAX_MMAP_REGIONS 16 /******************************************************************************* -- cgit v1.2.3