summaryrefslogtreecommitdiff
path: root/src/arch/arm64/arm_tf.c
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2015-10-07 18:38:24 -0700
committerJulius Werner <jwerner@chromium.org>2015-11-11 05:07:58 +0100
commitfe4cbf1167fcb27ec332a2efe16297705ca07359 (patch)
tree31ba9883a29574842f33d9fb073c979437d48cb4 /src/arch/arm64/arm_tf.c
parent03a0a6517210b4f53082a499df2a7e743ae7452e (diff)
downloadcoreboot-fe4cbf1167fcb27ec332a2efe16297705ca07359.tar.xz
arm64: mmu: Make page table manipulation work across stages
In order to have a proper runtime-modifyable page table API (e.g. to remap DRAM after it was intialized), we need to remove any external bookkeeping kept in global variables (which do not persist across stages) from the MMU code. This patch implements this in a similar way as it has recently been done for ARM32 (marking free table slots with a special sentinel value in the first PTE that cannot occur as part of a normal page table). Since this requires the page table buffer to be known at compile-time, we have to remove the option of passing it to mmu_init() at runtime (which I already kinda deprecated before). The existing Tegra chipsets that still used it are switched to instead define it in memlayout in a minimally invasive change. This might not be the best way to design this overall (I think we should probably just throw the tables into SRAM like on all other platforms), but I don't have a Tegra system to test so I'd rather keep this change low impact and leave the major redesign for later. Also inlined some single-use one-liner functions in mmu.c that I felt confused things more than they cleared up, and fixed an (apparently harmless?) issue with forgetting to mask out the XN page attribute bit when casting a table descriptor to a pointer. BRANCH=None BUG=None TEST=Compiled Ryu and Smaug. Booted Oak. Change-Id: Iad71f97f5ec4b1fc981dbc8ff1dc88d96c8ee55a Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: http://review.coreboot.org/12075 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/arch/arm64/arm_tf.c')
-rw-r--r--src/arch/arm64/arm_tf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/arch/arm64/arm_tf.c b/src/arch/arm64/arm_tf.c
index b8f0f5f5b2..6435fc74d5 100644
--- a/src/arch/arm64/arm_tf.c
+++ b/src/arch/arm64/arm_tf.c
@@ -15,6 +15,7 @@
#include <arch/cache.h>
#include <arch/lib_helpers.h>
+#include <arch/mmu.h>
#include <arch/transition.h>
#include <arm_tf.h>
#include <assert.h>
@@ -83,7 +84,7 @@ void arm_tf_run_bl31(u64 payload_entry, u64 payload_arg0, u64 payload_spsr)
dcache_clean_by_mva(&bl31_params, sizeof(bl31_params));
dcache_clean_by_mva(&bl33_ep_info, sizeof(bl33_ep_info));
- dcache_mmu_disable();
+ mmu_disable();
bl31_entry(&bl31_params, bl31_plat_params);
die("BL31 returned!");
}