* [AArch64 boot-wrapper][PATCH] aarch64: Enable FGT for EL2
@ 2021-05-03 12:09 Marc Zyngier
2021-05-04 15:19 ` Andre Przywara
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Marc Zyngier @ 2021-05-03 12:09 UTC (permalink / raw)
To: linux-arm-kernel; +Cc: Mark Rutland, broonie, kernel-team
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
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [AArch64 boot-wrapper][PATCH] aarch64: Enable FGT for EL2
2021-05-03 12:09 [AArch64 boot-wrapper][PATCH] aarch64: Enable FGT for EL2 Marc Zyngier
@ 2021-05-04 15:19 ` Andre Przywara
2021-05-04 15:29 ` Sudeep Holla
2021-05-04 15:31 ` Mark Rutland
2 siblings, 0 replies; 4+ messages in thread
From: Andre Przywara @ 2021-05-04 15:19 UTC (permalink / raw)
To: Marc Zyngier; +Cc: linux-arm-kernel, Mark Rutland, broonie, kernel-team
On Mon, 3 May 2021 13:09:20 +0100
Marc Zyngier <maz@kernel.org> wrote:
> 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>
Verified the bits used against the ARM ARM. Also Trusted Firmware does
the same thing, so:
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Cheers,
Andre
> ---
>
> 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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [AArch64 boot-wrapper][PATCH] aarch64: Enable FGT for EL2
2021-05-03 12:09 [AArch64 boot-wrapper][PATCH] aarch64: Enable FGT for EL2 Marc Zyngier
2021-05-04 15:19 ` Andre Przywara
@ 2021-05-04 15:29 ` Sudeep Holla
2021-05-04 15:31 ` Mark Rutland
2 siblings, 0 replies; 4+ messages in thread
From: Sudeep Holla @ 2021-05-04 15:29 UTC (permalink / raw)
To: Marc Zyngier; +Cc: linux-arm-kernel, Mark Rutland, broonie, kernel-team
On Mon, May 03, 2021 at 01:09:20PM +0100, Marc Zyngier wrote:
> We have no intention of handling FGT traps to EL3, so let EL2
> play with the feature directly.
>
I had cooked up hacky fix after Mark Brown pointed out this could be
reason for boot failure on FVP. So,
Tested-by: Sudeep Holla <sudeep.holla@arm.com>
--
Regards,
Sudeep
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [AArch64 boot-wrapper][PATCH] aarch64: Enable FGT for EL2
2021-05-03 12:09 [AArch64 boot-wrapper][PATCH] aarch64: Enable FGT for EL2 Marc Zyngier
2021-05-04 15:19 ` Andre Przywara
2021-05-04 15:29 ` Sudeep Holla
@ 2021-05-04 15:31 ` Mark Rutland
2 siblings, 0 replies; 4+ messages in thread
From: Mark Rutland @ 2021-05-04 15:31 UTC (permalink / raw)
To: Marc Zyngier; +Cc: linux-arm-kernel, broonie, kernel-team
On Mon, May 03, 2021 at 01:09:20PM +0100, Marc Zyngier wrote:
> 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>
Thanks; applied.
Mark.
> ---
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-05-04 15:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-03 12:09 [AArch64 boot-wrapper][PATCH] aarch64: Enable FGT for EL2 Marc Zyngier
2021-05-04 15:19 ` Andre Przywara
2021-05-04 15:29 ` Sudeep Holla
2021-05-04 15:31 ` Mark Rutland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox