aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2021-05-05 10:38:55 +0100
committerMark Rutland <mark.rutland@arm.com>2021-05-06 09:22:03 +0100
commit05347efa932c34b8ab332f5b829f57a2a9ace91b (patch)
tree76fa36493dfd5337c13f65b69b979cb93f14e17a
parent9a9f85ce6f128125d2b5ee3700e36fb89d31cdc0 (diff)
downloadboot-wrapper-aarch64-05347efa932c34b8ab332f5b829f57a2a9ace91b.tar.gz
aarch64: Enable access to allocation tags if MTE is present
SCR_EL3.ATA must be set so that software can access the allocation (in-memory) MTE tags. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
-rw-r--r--arch/aarch64/boot.S8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/aarch64/boot.S b/arch/aarch64/boot.S
index fd7133d..a9264de 100644
--- a/arch/aarch64/boot.S
+++ b/arch/aarch64/boot.S
@@ -62,6 +62,14 @@ _start:
orr x0, x0, #(1 << 27) // FGT enable
1:
+ /* Enable MTE if present */
+ mrs x10, id_aa64pfr1_el1
+ ubfx x10, x10, #8, #4
+ cmp x10, #2
+ b.lt 1f
+
+ orr x0, x0, #(1 << 26) // ATA enable
+1:
#ifndef KERNEL_32
orr x0, x0, #(1 << 10) // 64-bit EL2
#endif