summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2016-04-24 22:50:20 +0100
committerAndre Przywara <andre.przywara@arm.com>2016-06-02 01:29:47 +0100
commit713f17de1a768b53bb80b30d52c047f8b3c151dd (patch)
tree3f2f9c749543ed718ee5f6e2b86e8971edc3ca98
parentc3d213438c1cb492cbe752c57de413bd3f63904d (diff)
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 <andre.przywara@arm.com>
-rw-r--r--plat/sun50iw1p1/aarch64/sunxi_common.c5
-rw-r--r--plat/sun50iw1p1/include/platform_def.h2
2 files changed, 4 insertions, 3 deletions
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
/*******************************************************************************