[PATCH] ARM: cpuinfo: print exception level

Sascha Hauer sha at pengutronix.de
Thu Jun 2 23:50:48 PDT 2022


On Thu, Jun 02, 2022 at 12:28:50PM +0200, Ahmad Fatoum wrote:
> barebox boot on ARMv8 usually involves switching exception level, but
> nevertheless during bring up, it can be useful to query exception level
> from the command line. Thus add it to cpuinfo output. There's no
> straight equivalent for ARMv7, so we #ifdef it out for non-v8.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
> ---
>  arch/arm/cpu/cpuinfo.c | 4 ++++
>  1 file changed, 4 insertions(+)

Applied, thanks

Sascha

> 
> diff --git a/arch/arm/cpu/cpuinfo.c b/arch/arm/cpu/cpuinfo.c
> index 8a92432e904f..aea50e80d194 100644
> --- a/arch/arm/cpu/cpuinfo.c
> +++ b/arch/arm/cpu/cpuinfo.c
> @@ -230,6 +230,10 @@ static int do_cpuinfo(int argc, char *argv[])
>  			printf("core: %s r%up%u\n", part, major, minor);
>  	}
>  
> +#ifdef CONFIG_CPU_64v8
> +	printf("exception level: %u\n", current_el());
> +#endif
> +
>  	if (cache & (1 << 24)) {
>  		/* separate I/D cache */
>  		printf("I-cache: ");
> -- 
> 2.30.2
> 
> 
> _______________________________________________
> barebox mailing list
> barebox at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list