[PATCH 0/4] efi_loader: enable running the debug UEFI shell

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Thu Jan 2 19:11:29 CET 2025


Currently running the SCT fails on x86. The EFI shell overrides U-Boot's
Simple Text Output Protocol. When ConsoleLoggerPrintWithPageBreak() is
invoked with ConsoleInfo == NULL a crash occurs.

Debugging requires running the debug version of the UEFI shell.
We can use `add-symbol-file` in gdb to point to
Build/Shell/DEBUG_GCC/X64/ShellPkg/Application/Shell/Shell/DEBUG/Shell.dll
and the load address of Shell.efi.

The debug version of the UEFI shell checks several requirements and
fails to run without them:

* HOB list (only on x86)
* HII configuration protocol
* DXE services table

Implement the missing requirements.

When starting image add the image load address to the debug output.

Heinrich Schuchardt (4):
  efi_loader: implement a HOB list
  efi_loader: build with HII configuration protocol
  efi_loader: install DXE services table
  efi_loader: print image load address in StartImage

 include/efi_dxe.h               |  54 ++++++++++
 include/efi_hob.h               |  32 ++++++
 include/efi_loader.h            |  16 +++
 lib/efi_loader/Kconfig          |  15 +++
 lib/efi_loader/Makefile         |   4 +-
 lib/efi_loader/efi_boottime.c   |   7 +-
 lib/efi_loader/efi_dxe.c        | 176 ++++++++++++++++++++++++++++++++
 lib/efi_loader/efi_hii_config.c |   4 -
 lib/efi_loader/efi_hob.c        |  33 ++++++
 lib/efi_loader/efi_root_node.c  |   3 +
 lib/efi_loader/efi_setup.c      |  13 +++
 11 files changed, 349 insertions(+), 8 deletions(-)
 create mode 100644 include/efi_dxe.h
 create mode 100644 include/efi_hob.h
 create mode 100644 lib/efi_loader/efi_dxe.c
 create mode 100644 lib/efi_loader/efi_hob.c

-- 
2.47.1



More information about the U-Boot mailing list