[Concept,v2,03/22] arm: Show the exception level with bdinfo

Message ID 20250819185900.835939-4-sjg@u-boot.org
State New
Headers
Series efi: Improvements for the EFI app on ARM |

Commit Message

Simon Glass Aug. 19, 2025, 6:58 p.m. UTC
  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>
---

Changes in v2:
- Use the existing current_el() function

 arch/arm/lib/bdinfo.c | 4 ++++
 1 file changed, 4 insertions(+)
  

Patch

diff --git a/arch/arm/lib/bdinfo.c b/arch/arm/lib/bdinfo.c
index 73033310879..d7426efbd7c 100644
--- a/arch/arm/lib/bdinfo.c
+++ b/arch/arm/lib/bdinfo.c
@@ -11,6 +11,7 @@ 
 #include <init.h>
 #include <asm/global_data.h>
 #include <asm/mach-types.h>
+#include <asm/system.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -61,4 +62,7 @@  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
+	lprint_num_l("CurrentEL", current_el());
+#endif
 }