]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
vexpress64: Add MMU tables
authorAlexander Graf <agraf@suse.de>
Fri, 4 Mar 2016 00:09:51 +0000 (01:09 +0100)
committerTom Rini <trini@konsulko.com>
Tue, 15 Mar 2016 19:13:04 +0000 (15:13 -0400)
There's no good excuse for running with caches disabled on AArch64,
so let's just move the vexpress64 target to enable the MMU and run
with caches on.

Signed-off-by: Alexander Graf <agraf@suse.de>
board/armltd/vexpress64/vexpress64.c
include/configs/vexpress_aemv8a.h

index 6efc8c183a625648accf7b7f0ada8b0b5e0bf1ac..973b57969f8f418f6d02a5e41fad08527d1a515f 100644 (file)
@@ -14,6 +14,7 @@
 #include <dm/platdata.h>
 #include <dm/platform_data/serial_pl01x.h>
 #include "pcie.h"
+#include <asm/armv8/mmu.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -28,6 +29,26 @@ U_BOOT_DEVICE(vexpress_serials) = {
        .platdata = &serial_platdata,
 };
 
+static struct mm_region vexpress64_mem_map[] = {
+       {
+               .base = 0x0UL,
+               .size = 0x80000000UL,
+               .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
+                        PTE_BLOCK_NON_SHARE |
+                        PTE_BLOCK_PXN | PTE_BLOCK_UXN
+       }, {
+               .base = 0x80000000UL,
+               .size = 0xff80000000UL,
+               .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
+                        PTE_BLOCK_INNER_SHARE
+       }, {
+               /* List terminator */
+               0,
+       }
+};
+
+struct mm_region *mem_map = vexpress64_mem_map;
+
 /* This function gets replaced by platforms supporting PCIe.
  * The replacement function, eg. on Juno, initialises the PCIe bus.
  */
index 269053e2bef81e9d8815ba8d1df5accddb191064..e398bdbd40dfeadf157b12c69b8eb4ba94b9577a 100644 (file)
@@ -19,9 +19,9 @@
 
 #define CONFIG_SUPPORT_RAW_INITRD
 
-/* Cache Definitions */
-#define CONFIG_SYS_DCACHE_OFF
-#define CONFIG_SYS_ICACHE_OFF
+/* MMU Definitions */
+#define CONFIG_SYS_CACHELINE_SIZE      64
+#define CONFIG_SYS_FULL_VA
 
 #define CONFIG_IDENT_STRING            " vexpress_aemv8a"
 #define CONFIG_BOOTP_VCI_STRING                "U-Boot.armv8.vexpress_aemv8a"