On Thu, Nov 28, 2024 at 12:05:09PM +0100, Ard Biesheuvel wrote: > If you're happy to experiment more, you could try and register a > notification for EFI_EVENT_GROUP_BEFORE_EXIT_BOOT_SERVICES using > CreateEventEx(), and see if it gets called when ExitBootServices() is > called. That would at least help narrow it down. Thanks for the suggestion. I see the notify function being called when I signal it as well as on each ExitBootServices(). With an efi_printk() in the callback ExitBootServices() fails as expected, but with an empty function the kernel seems to start every time. Interestingly, ExitBootServices() now succeeds also if I add back the CloseEvent() call. In fact, it works also if I never signal the event (i.e. if I just create and close the event). The patch below should suffice as a workaround I can carry until the firmware has been fixed. Johan