aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2021-05-03 13:09:20 +0100
committerMark Rutland <mark.rutland@arm.com>2021-05-04 16:23:47 +0100
commit9a9f85ce6f128125d2b5ee3700e36fb89d31cdc0 (patch)
tree1456075e952ff4433498a392be690d1f646ba979
parent22fc09cddd96dda9118faaa5c734e59949d9ae41 (diff)
downloadboot-wrapper-aarch64-9a9f85ce6f128125d2b5ee3700e36fb89d31cdc0.tar.gz
aarch64: Enable FGT for EL2
We have no intention of handling FGT traps to EL3, so let EL2 play with the feature directly. Signed-off-by: Marc Zyngier <maz@kernel.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> 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 e47cf59..fd7133d 100644
--- a/arch/aarch64/boot.S
+++ b/arch/aarch64/boot.S
@@ -55,6 +55,13 @@ _start:
orr x0, x0, #(1 << 34) // TME enable
1:
+ /* Enable FGT if present */
+ mrs x1, id_aa64mmfr0_el1
+ ubfx x1, x1, #56, #4
+ cbz x1, 1f
+
+ orr x0, x0, #(1 << 27) // FGT enable
+1:
#ifndef KERNEL_32
orr x0, x0, #(1 << 10) // 64-bit EL2
#endif