From fde882bd42e4f34c4e1e8700d7f1e0de554a2121 Mon Sep 17 00:00:00 2001 From: Mark Harmstone Date: Sun, 8 Nov 2020 16:39:43 +0000 Subject: [PATCH] show_menu: work round bug in old EFIs --- src/menu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/menu.c b/src/menu.c index 8a47fd5..f2dca4c 100644 --- a/src/menu.c +++ b/src/menu.c @@ -675,7 +675,9 @@ EFI_STATUS show_menu(EFI_SYSTEM_TABLE* systable, boot_option** ret) { print((WCHAR*)timeout_message); print_dec(timer); - Status = systable->BootServices->CreateEvent(EVT_TIMER, TPL_APPLICATION, NULL, NULL, &evt); + /* The second parameter to CreateEvent was originally TPL_APPLICATION, but some old + * EFIs ignore the specs and return EFI_INVALID_PARAMETER if you do this. */ + Status = systable->BootServices->CreateEvent(EVT_TIMER, TPL_CALLBACK, NULL, NULL, &evt); if (EFI_ERROR(Status)) { print_error(L"CreateEvent", Status); goto end;