diff options
-rw-r--r-- | sys/boot/amd64/boot1.efi/boot1.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/boot/amd64/boot1.efi/boot1.c b/sys/boot/amd64/boot1.efi/boot1.c index cb75d2a..4a8f951 100644 --- a/sys/boot/amd64/boot1.efi/boot1.c +++ b/sys/boot/amd64/boot1.efi/boot1.c @@ -307,12 +307,19 @@ load(const char *fname) /* XXX: For secure boot, we need our own loader here */ status = systab->BootServices->LoadImage(TRUE, image, bootdevpath, buffer, bufsize, &loaderhandle); + if (EFI_ERROR(status)) + printf("LoadImage failed with error %lx\n", status); status = systab->BootServices->HandleProtocol(loaderhandle, &LoadedImageGUID, (VOID**)&loaded_image); + if (EFI_ERROR(status)) + printf("HandleProtocol failed with error %lx\n", status); + loaded_image->DeviceHandle = bootdevhandle; status = systab->BootServices->StartImage(loaderhandle, NULL, NULL); + if (EFI_ERROR(status)) + printf("StartImage failed with error %lx\n", status); } static void |