summaryrefslogtreecommitdiff
path: root/plat/common
diff options
context:
space:
mode:
authorJeenu Viswambharan <jeenu.viswambharan@arm.com>2018-04-27 15:17:03 +0100
committerJeenu Viswambharan <jeenu.viswambharan@arm.com>2018-06-27 11:31:30 +0100
commit64ee263e20611fae9ddf0ee4a8fcfeb6fbc724ae (patch)
treef3207482f0c5ca18743a73d2568b81d4505722ff /plat/common
parent92bec97f5c39b16b1599d41337ae4556b6da6c72 (diff)
DynamIQ: Enable MMU without using stack
Having an active stack while enabling MMU has shown coherency problems. This patch builds on top of translation library changes that introduces MMU-enabling without using stacks. Previously, with HW_ASSISTED_COHERENCY, data caches were disabled while enabling MMU only because of active stack. Now that we can enable MMU without using stack, we can enable both MMU and data caches at the same time. NOTE: Since this feature depends on using translation table library v2, disallow using translation table library v1 with HW_ASSISTED_COHERENCY. Fixes ARM-software/tf-issues#566 Change-Id: Ie55aba0c23ee9c5109eb3454cb8fa45d74f8bbb2 Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Diffstat (limited to 'plat/common')
-rw-r--r--plat/common/aarch64/plat_common.c12
-rw-r--r--plat/common/aarch64/platform_helpers.S22
2 files changed, 22 insertions, 12 deletions
diff --git a/plat/common/aarch64/plat_common.c b/plat/common/aarch64/plat_common.c
index 409ae55a..5f2972cc 100644
--- a/plat/common/aarch64/plat_common.c
+++ b/plat/common/aarch64/plat_common.c
@@ -18,8 +18,6 @@
* provide typical implementations that may be re-used by multiple
* platforms but may also be overridden by a platform if required.
*/
-#pragma weak bl31_plat_enable_mmu
-#pragma weak bl32_plat_enable_mmu
#pragma weak bl31_plat_runtime_setup
#if !ERROR_DEPRECATED
#pragma weak plat_get_syscnt_freq2
@@ -33,16 +31,6 @@
#pragma weak plat_ea_handler
-void bl31_plat_enable_mmu(uint32_t flags)
-{
- enable_mmu_el3(flags);
-}
-
-void bl32_plat_enable_mmu(uint32_t flags)
-{
- enable_mmu_el1(flags);
-}
-
void bl31_plat_runtime_setup(void)
{
#if MULTI_CONSOLE_API
diff --git a/plat/common/aarch64/platform_helpers.S b/plat/common/aarch64/platform_helpers.S
index 033a12f8..a413f5fd 100644
--- a/plat/common/aarch64/platform_helpers.S
+++ b/plat/common/aarch64/platform_helpers.S
@@ -17,6 +17,8 @@
.weak plat_disable_acp
.weak bl1_plat_prepare_exit
.weak plat_panic_handler
+ .weak bl31_plat_enable_mmu
+ .weak bl32_plat_enable_mmu
#if !ENABLE_PLAT_COMPAT
.globl platform_get_core_pos
@@ -164,3 +166,23 @@ func plat_panic_handler
wfi
b plat_panic_handler
endfunc plat_panic_handler
+
+ /* -----------------------------------------------------
+ * void bl31_plat_enable_mmu(uint32_t flags);
+ *
+ * Enable MMU in BL31.
+ * -----------------------------------------------------
+ */
+func bl31_plat_enable_mmu
+ b enable_mmu_direct_el3
+endfunc bl31_plat_enable_mmu
+
+ /* -----------------------------------------------------
+ * void bl32_plat_enable_mmu(uint32_t flags);
+ *
+ * Enable MMU in BL32.
+ * -----------------------------------------------------
+ */
+func bl32_plat_enable_mmu
+ b enable_mmu_direct_el1
+endfunc bl32_plat_enable_mmu