summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/system.h
diff options
context:
space:
mode:
authorSergey Temerkhanov <s.temerkhanov@gmail.com>2015-10-14 09:55:45 -0700
committerTom Rini <trini@konsulko.com>2016-01-19 22:25:36 +0000
commit94f7ff36e521674a02145a3ff04b659c40122ba3 (patch)
tree34b1fa03bdd7b9581994ec71f6c85ce5da114622 /arch/arm/include/asm/system.h
parentba5648cd91b010a9288798472a6d51b137fff89d (diff)
downloadtalos-obmc-uboot-94f7ff36e521674a02145a3ff04b659c40122ba3.tar.gz
talos-obmc-uboot-94f7ff36e521674a02145a3ff04b659c40122ba3.zip
armv8: New MMU setup code allowing to use 48+ bits PA/VA
This patch adds code which sets up 2-level page tables on ARM64 thus extending available VA space. CPUs implementing 64k translation granule are able to use direct PA-VA mapping of the whole 48 bit address space. It also adds the ability to reset the SCTRL register at the very beginning of execution to avoid interference from stale mappings set up by early firmware/loaders/etc. Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com> Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
Diffstat (limited to 'arch/arm/include/asm/system.h')
-rw-r--r--arch/arm/include/asm/system.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index 5d66fa00b6..393e7afcdd 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -14,7 +14,12 @@
#define CR_WXN (1 << 19) /* Write Permision Imply XN */
#define CR_EE (1 << 25) /* Exception (Big) Endian */
+#ifndef CONFIG_SYS_FULL_VA
#define PGTABLE_SIZE (0x10000)
+#else
+#define PGTABLE_SIZE CONFIG_SYS_PGTABLE_SIZE
+#endif
+
/* 2MB granularity */
#define MMU_SECTION_SHIFT 21
#define MMU_SECTION_SIZE (1 << MMU_SECTION_SHIFT)
@@ -148,7 +153,9 @@ void flush_l3_cache(void);
#define CR_AFE (1 << 29) /* Access flag enable */
#define CR_TE (1 << 30) /* Thumb exception enable */
+#ifndef PGTABLE_SIZE
#define PGTABLE_SIZE (4096 * 4)
+#endif
/*
* This is used to ensure the compiler did actually allocate the register we
OpenPOWER on IntegriCloud