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
This commit is contained in:
parent
ba76ce40b4
commit
411443334b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=279738
@ -307,12 +307,19 @@ load(const char *fname)
|
|||||||
/* XXX: For secure boot, we need our own loader here */
|
/* XXX: For secure boot, we need our own loader here */
|
||||||
status = systab->BootServices->LoadImage(TRUE, image, bootdevpath,
|
status = systab->BootServices->LoadImage(TRUE, image, bootdevpath,
|
||||||
buffer, bufsize, &loaderhandle);
|
buffer, bufsize, &loaderhandle);
|
||||||
|
if (EFI_ERROR(status))
|
||||||
|
printf("LoadImage failed with error %d\n", status);
|
||||||
|
|
||||||
status = systab->BootServices->HandleProtocol(loaderhandle,
|
status = systab->BootServices->HandleProtocol(loaderhandle,
|
||||||
&LoadedImageGUID, (VOID**)&loaded_image);
|
&LoadedImageGUID, (VOID**)&loaded_image);
|
||||||
|
if (EFI_ERROR(status))
|
||||||
|
printf("HandleProtocol failed with error %d\n", status);
|
||||||
|
|
||||||
loaded_image->DeviceHandle = bootdevhandle;
|
loaded_image->DeviceHandle = bootdevhandle;
|
||||||
|
|
||||||
status = systab->BootServices->StartImage(loaderhandle, NULL, NULL);
|
status = systab->BootServices->StartImage(loaderhandle, NULL, NULL);
|
||||||
|
if (EFI_ERROR(status))
|
||||||
|
printf("StartImage failed with error %d\n", status);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user