* [PATCH] ARM: cpuinfo: print exception level
@ 2022-06-02 10:28 Ahmad Fatoum
2022-06-03 6:50 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2022-06-02 10:28 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
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@pengutronix.de>
---
arch/arm/cpu/cpuinfo.c | 4 ++++
1 file changed, 4 insertions(+)
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ARM: cpuinfo: print exception level
2022-06-02 10:28 [PATCH] ARM: cpuinfo: print exception level Ahmad Fatoum
@ 2022-06-03 6:50 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2022-06-03 6:50 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
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@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@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 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-03 6:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-02 10:28 [PATCH] ARM: cpuinfo: print exception level Ahmad Fatoum
2022-06-03 6:50 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox