Skip to contentSkip to conversation

Enable TME for lower exception levels

PATCH Applied Will Deacon 2 participants 2 messages Aug 23, 2019 – Aug 27, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 arch/aarch64/boot.S | 7 +++++++
 1 file changed, 7 insertions(+)
arch/aarch64/boot.S +7 -0
index 74705cded338..c2fe92c90297 100644
@@ -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
Signature · 7 lines
2.11.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Applied
#1 lore raw
Quoted 4 lines · Will Deacon

By default, TME is not available to exception levels below EL3, so enable it in SCR_EL3 if we detect that it is implemented.

Applied, thanks!

Mark.

Quoted 25 lines
---
 arch/aarch64/boot.S | 7 +++++++
 1 file changed, 7 insertions(+)
arch/aarch64/boot.S +7 -0
index 74705cded338..c2fe92c90297 100644
@@ -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
Signature · 1 line
2.11.0

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel