svn commit: r279738 - head/sys/boot/amd64/boot1.efi
Edward Tomasz Napierala
trasz at FreeBSD.org
Sat Mar 7 19:14:03 UTC 2015
Author: trasz
Date: Sat Mar 7 19:14:01 2015
New Revision: 279738
URL: https://svnweb.freebsd.org/changeset/base/279738
Log:
Add error reporting (but not actual handling yet, apart from
reporting them) for EFI calls to boot1.efi.
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Modified:
head/sys/boot/amd64/boot1.efi/boot1.c
Modified: head/sys/boot/amd64/boot1.efi/boot1.c
==============================================================================
--- head/sys/boot/amd64/boot1.efi/boot1.c Sat Mar 7 18:48:00 2015 (r279737)
+++ head/sys/boot/amd64/boot1.efi/boot1.c Sat Mar 7 19:14:01 2015 (r279738)
@@ -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 %d\n", status);
status = systab->BootServices->HandleProtocol(loaderhandle,
&LoadedImageGUID, (VOID**)&loaded_image);
+ if (EFI_ERROR(status))
+ printf("HandleProtocol failed with error %d\n", status);
+
loaded_image->DeviceHandle = bootdevhandle;
status = systab->BootServices->StartImage(loaderhandle, NULL, NULL);
+ if (EFI_ERROR(status))
+ printf("StartImage failed with error %d\n", status);
}
static void
More information about the svn-src-all
mailing list