aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Deacon <will@kernel.org>2019-08-23 15:50:15 +0100
committerMark Rutland <mark.rutland@arm.com>2019-08-27 12:04:01 +0100
commitfd74c8cbd0e17483d2299208cad9742bee605ca7 (patch)
tree77ced595c5298d3ed5d097c9386c22b4553bba91
parentc11fd1e6e65399244b14d3f3d9052e2e5b7b943d (diff)
downloadboot-wrapper-aarch64-fd74c8cbd0e17483d2299208cad9742bee605ca7.tar.gz
Enable TME for lower exception levels
By default, TME is not available to exception levels below EL3, so enable it in SCR_EL3 if we detect that it is implemented. Signed-off-by: Will Deacon <will@kernel.org> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
-rw-r--r--arch/aarch64/boot.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/aarch64/boot.S b/arch/aarch64/boot.S
index 74705cd..c2fe92c 100644
--- a/arch/aarch64/boot.S
+++ b/arch/aarch64/boot.S
@@ -48,6 +48,13 @@ _start:
orr x0, x0, #(1 << 16) // AP key enable
orr x0, x0, #(1 << 17) // AP insn enable
1:
+ /* Enable TME if present */
+ mrs x1, id_aa64isar0_el1
+ ubfx x1, x1, #24, #4
+ cbz x1, 1f
+
+ orr x0, x0, #(1 << 34) // TME enable
+1:
#ifndef KERNEL_32
orr x0, x0, #(1 << 10) // 64-bit EL2
#endif