From: Marc Zyngier <maz@kernel.org>
To: linux-arm-kernel@lists.infradead.org
Cc: Mark Rutland <mark.rutland@arm.com>,
broonie@kernel.org, kernel-team@android.com
Subject: [AArch64 boot-wrapper][PATCH] aarch64: Enable FGT for EL2
Date: Mon, 3 May 2021 13:09:20 +0100 [thread overview]
Message-ID: <20210503120920.1819233-1-maz@kernel.org> (raw)
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>
---
Notes:
Needed to boot Linux 5.13 at EL2.
arch/aarch64/boot.S | 7 +++++++
1 file changed, 7 insertions(+)
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
@@ -54,6 +54,13 @@ _start:
cbz x1, 1f
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
--
2.29.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2021-05-03 12:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-03 12:09 Marc Zyngier [this message]
2021-05-04 15:19 ` [AArch64 boot-wrapper][PATCH] aarch64: Enable FGT for EL2 Andre Przywara
2021-05-04 15:29 ` Sudeep Holla
2021-05-04 15:31 ` Mark Rutland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210503120920.1819233-1-maz@kernel.org \
--to=maz@kernel.org \
--cc=broonie@kernel.org \
--cc=kernel-team@android.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox