On 01.07.25 05:49, Ying-Chun Liu (PaulLiu) wrote:
From: "Ying-Chun Liu (PaulLiu)" <[email protected]>
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) <[email protected]>
Cc: Heinrich Schuchardt <[email protected]>
Cc: Ilias Apalodimas <[email protected]>
Cc: Peter Robinson <[email protected]>
Cc: Simon Glass <[email protected]>
Hello Paul,
with
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
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 <[email protected]>