Open nkraetzschmar opened 1 month ago
Thank you for reporting the issue. The root cause is that the ImageBase points to unmapped memory address.
By PR #85, the firmware tries to load the PE to the address specified by ImageBase if ImageBase is not zero. (This behavior is to boot Windows) RHF/x86_64 maps the memory on the first 4GB (0x100000000) only, but your PE binary ImageBase is 0x14df90000 which is not mapped memory region.
Trying to load EFI binaries with the ImageBase field in the PE binary fails with errors like
An example of such a binary is any UKI using the systemd boot stub compiled from recent versions of systemd, these set the ImageBase field to a pseudo-random value^1. Forcing this to be
opt.ImageBase = 0
allows the stub to be loaded by hypervisor-fw.objdump of working EFI binary:
objdump of broken EFI binary: