[AArch64 boot-wrapper][PATCH] aarch64: Enable FGT for EL2

Mark Rutland mark.rutland at arm.com
Tue May 4 08:31:08 PDT 2021


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 at 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
> 



More information about the linux-arm-kernel mailing list