On Mon, 2 Dec 2024 at 11:22, I wrote:> Sprinkling some dprintfs in efi/main.c suggests it's failing at
> exit_boot: the odd thing is that the dprintf I added _inside_
> exit_boot() itself doesn't get written, which suggests the failure is
> in the attempt to call exit_boot itself (either that or dprintf
> doesn't work within exit_boot?).
I inlined exit_boot in case something odd was going on with calling
it, and I got more failure information.
This call:
status = uefi_call_wrapper(BS->ExitBootServices, 2, image_handle, key);
is returning EFI_INVALID_PARAMETER, which (according to
https://uefi.org/specs/UEFI/2.10/07_Services_Boot_Services.html#id41 )
means "key" is incorrect.
However I'm not sure if that was because I'd interspersed dprintf()
calls between the call to get_memory_map and the call to
ExitBootServices: the web page suggests that you should do the first
just before the second so as not to invalidate the map. Certainly if I
take out those dprintf() calls I no longer get the message telling me
that ExitBootServices failed; unfortunately it still doesn't boot.
As I said, not really sure how to progress from here.
Geoff