[PATCH] efi_loader: Expose relocated address for gdb debugging purposes

Alex kallisti5 at unixzen.com
Thu Mar 24 20:02:53 CET 2022


March 24, 2022 1:25 PM, "Alexander von Gluck IV" <kallisti5 at unixzen.com> wrote:
> March 24, 2022 12:06 PM, "Heinrich Schuchardt" <xypron.glpk at gmx.de> wrote:
> 
>> On 3/24/22 17:22, Alexander von Gluck IV wrote:
>> Do we really always need this output for every invokation of LoadImage()?
>> 
>> Writing test messages during the runtime of a menu driven program like
>> the UEFI SCT can be very disturbing.
>> 
>> Isn't it sufficient to show this output for binaries directly launched
>> by U-Boot?
> 
> Ideally this would be exposed strictly for the binaries directly launched,
> however the bare relocated address isn't exposed outside of the brief
> usage by LoadImage.
> 
> I figured that adding a required pointer arg to expose the relocated address
> might be overkill.
> 
> using log_debug over log_info was brought up as a good change, but that
> still suffers the same potential impact.
> 
> Maybe adding reloc_addr storage to efi_loaded_image_obj would be cleaner?
> (then digging it up during the efi launch for a quick log_info?)

"PATCH] efi_loader (v2): Expose relocated address for gdb debugging purposes"
has been submitted.  Instead of printing the relocated address out immediately,
v2 stores it in the efi_loaded_image_obj and references it later during the 
initial EFI boot.

The output of v2 can be seen below.


54 bytes read in 0 ms
uEnv.txt says to look for efi bootloader named EFI/BOOT/BOOTRISCV64.EFI on virtio 0!
Found EFI/BOOT/BOOTRISCV64.EFI on virtio 0!
Loading bootloader...
800283 bytes read in 1 ms (763.2 MiB/s)
Using internal DTB...
Launching EFI loader...
Scanning disk virtio-blk#8...
Found 3 disks
** Unable to read file ubootefi.var **
Failed to load EFI variables
Booting /EFI\BOOT\BOOTRISCV64.EFI
EFI image relocated to 0xbe68e000


More information about the U-Boot mailing list