[boot-wrapper PATCH 4/5] aarch64: Prepare for booting with EL2

Andre Przywara andre.przywara at arm.com
Mon Apr 26 12:51:01 BST 2021


On Tue, 20 Apr 2021 15:24:37 +0800
Jaxson Han <jaxson.han at arm.com> wrote:

> Prepare for allowing boot-wrapper to be entered in EL2.
> 
> Signed-off-by: Jaxson Han <jaxson.han at arm.com>

Reviewed-by: Andre Przywara <andre.przywara at arm.com>

Thanks,
Andre

> ---
>  arch/aarch64/utils.S | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/aarch64/utils.S b/arch/aarch64/utils.S
> index ae22ea7..94e9931 100644
> --- a/arch/aarch64/utils.S
> +++ b/arch/aarch64/utils.S
> @@ -37,10 +37,18 @@ find_logical_id:
>  	ret
>  
>  /*
> - * Setup EL3 vectors
> + * Setup EL3/EL2 vectors
>   * x0: vector address
>   */
>  setup_vector:
> +	mrs	x1, CurrentEL
> +	cmp	x1, #CURRENTEL_EL2
> +	b.eq	1f
> +
>  	msr	VBAR_EL3, x0
>  	isb
>  	ret
> +
> +1:	msr	VBAR_EL2, x0
> +	isb
> +	ret




More information about the linux-arm-kernel mailing list