
On Mon, 18 Aug 2025 at 00:49, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
On 16.08.25 01:31, Simon Glass wrote:
From: Simon Glass <sjg@chromium.org>
Some machines start U-Boot in a different exception level, so provide a way to view it.
Signed-off-by: Simon Glass <sjg@chromium.org> ---
arch/arm/lib/bdinfo.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/arch/arm/lib/bdinfo.c b/arch/arm/lib/bdinfo.c index 73033310879..ca853f6f374 100644 --- a/arch/arm/lib/bdinfo.c +++ b/arch/arm/lib/bdinfo.c @@ -61,4 +61,11 @@ void arch_print_bdinfo(void) printf("Early malloc usage: %x / %x\n", gd->malloc_ptr, CONFIG_VAL(SYS_MALLOC_F_LEN)); #endif +#ifdef CONFIG_ARM64 + ulong el; + + /* the CurrentEL register holds the current Exception Level in bits 3:2 */ + asm volatile("mrs %0, CurrentEL" : "=r" (el)); + lprint_num_l("CurrentEL", el);
Please, use function current_el().
Duh! Thanks.
Best regards
Heinrich
+#endif }