From 40cf2a423d7a080999cb22d0cb0bae33ab028c62 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 14 May 2013 13:10:52 -0400 Subject: [PATCH] Pass parameters correctly when booting. Signed-off-by: Peter Jones --- fallback.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fallback.c b/fallback.c index 387c84a..cf1ebe4 100644 --- a/fallback.c +++ b/fallback.c @@ -626,6 +626,14 @@ try_start_first_option(EFI_HANDLE parent_image_handle) uefi_call_wrapper(BS->Stall, 1, 2000000); return rc; } + + EFI_LOADED_IMAGE *image; + rc = uefi_call_wrapper(BS->HandleProtocol, 3, image_handle, &LoadedImageProtocol, (void *)&image); + if (!EFI_ERROR(rc)) { + image->LoadOptions = first_new_option_args; + image->LoadOptionsSize = first_new_option_size; + } + rc = uefi_call_wrapper(BS->StartImage, 3, image_handle, NULL, NULL); if (EFI_ERROR(rc)) { Print(L"StartImage failed: %d\n", rc);