summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2015-12-21 19:49:00 +0000
committeremaste <emaste@FreeBSD.org>2015-12-21 19:49:00 +0000
commit261de747f4ab1d23b79d3608d9bf24e44a41944f (patch)
treec31a19ebfbee2e619ab6af35bd6ad391bea1244c /sys/boot
parentfc1a3087a9b9b1a0b3d7c7d8729d5eac43dd12b7 (diff)
downloadFreeBSD-src-261de747f4ab1d23b79d3608d9bf24e44a41944f.zip
FreeBSD-src-261de747f4ab1d23b79d3608d9bf24e44a41944f.tar.gz
MFC r279738, r281307: boot1.efi: add error reporting
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/amd64/boot1.efi/boot1.c7
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
OpenPOWER on IntegriCloud