[PATCH v7 4/6] efi: add EFI_DEBUG_IMAGE_INFO for debug

Heinrich Schuchardt xypron.glpk at gmx.de
Tue Jul 1 08:09:46 CEST 2025


On 01.07.25 05:49, Ying-Chun Liu (PaulLiu) wrote:
> From: "Ying-Chun Liu (PaulLiu)" <paul.liu at linaro.org>
> 
> This commit adds the functionality of generate EFI_DEBUG_IMAGE_INFO
> while loading the image.
> 
> This feature is described in UEFI Spec 2.10. Section 18.4.3.
> The implementation ensures support for hardware-assisted debugging and
> provides a standardized mechanism for debuggers to discover the load
> address of an EFI application.
> 
> Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu at linaro.org>
> Cc: Heinrich Schuchardt <xypron.glpk at gmx.de>
> Cc: Ilias Apalodimas <ilias.apalodimas at linaro.org>
> Cc: Peter Robinson <pbrobinson at gmail.com>
> Cc: Simon Glass <sjg at chromium.org>


Hello Paul,

with
https://patchwork.ozlabs.org/project/uboot/patch/20250429084138.239990-1-heinrich.schuchardt@canonical.com/
I got this output:

Debug Info Table Dump
=====================

=> dump
Modified
Number of entries: 0x00000002
Info type 0x00000001
   Address: [0x00000000bdd47000, 0x00000000bde5aabf]
   File: /shellriscv64.efi
   Handle: 0x00000000beeb17a0
Info type 0x00000001
   Address: [0x00000000bdbeb000, 0x00000000bdbee1ff]
   File: /\dbginfodump.efi
   Handle: 0x00000000bef12890
=>

I found the PE-COFF headers of the EFI binaries in the provided locations:

(gdb) p *(char[0x44]*)0xbdbeb000
$1 = "MZ", '\000' <repeats 46 times>, 
"RISCV\000\000\000RSC\005@\000\000\000PE\000"
(gdb) p *(char[0x84]*)0xbdd47000
$2 = "MZ", '\000' <repeats 58 times>, "\200", '\000' <repeats 67 times>, 
"PE\000"

This looks good.

Tested-by: Heinrich Schuchardt <xypron.glpk at gmx.de>


More information about the U-Boot mailing list