diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2021-05-05 10:38:55 +0100 |
---|---|---|
committer | Mark Rutland <mark.rutland@arm.com> | 2021-05-06 09:22:03 +0100 |
commit | 05347efa932c34b8ab332f5b829f57a2a9ace91b (patch) | |
tree | 76fa36493dfd5337c13f65b69b979cb93f14e17a | |
parent | 9a9f85ce6f128125d2b5ee3700e36fb89d31cdc0 (diff) | |
download | boot-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.S | 8 |
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 |