aboutsummaryrefslogtreecommitdiff
path: root/stand/efi/boot1
diff options
context:
space:
mode:
Diffstat (limited to 'stand/efi/boot1')
-rw-r--r--stand/efi/boot1/Makefile2
-rw-r--r--stand/efi/boot1/boot1.c11
-rw-r--r--stand/efi/boot1/proto.c4
-rw-r--r--stand/efi/boot1/ufs_module.c2
-rw-r--r--stand/efi/boot1/zfs_module.c2
5 files changed, 12 insertions, 9 deletions
diff --git a/stand/efi/boot1/Makefile b/stand/efi/boot1/Makefile
index e2966e813504..c9f04546b56b 100644
--- a/stand/efi/boot1/Makefile
+++ b/stand/efi/boot1/Makefile
@@ -44,7 +44,7 @@ CFLAGS.zfs_module.c+= -include ${ZFSOSINC}/spl/sys/ccompile.h
CFLAGS+= -DEFI_ZFS_BOOT
.endif
-CFLAGS+= -I${EFIINC}
+CFLAGS+= -I${EFIINC} -I${EDK2INC}
CFLAGS+= -I${EFIINCMD}
CFLAGS+= -I${SYSDIR}/contrib/dev/acpica/include
CFLAGS+= -DEFI_UFS_BOOT
diff --git a/stand/efi/boot1/boot1.c b/stand/efi/boot1/boot1.c
index c906b430c0d6..cad43206aa6a 100644
--- a/stand/efi/boot1/boot1.c
+++ b/stand/efi/boot1/boot1.c
@@ -118,7 +118,7 @@ try_boot(const boot_module_t *mod, dev_info_t *dev, void *loaderbuf, size_t load
if ((status = BS->LoadImage(TRUE, IH, efi_devpath_last_node(dev->devpath),
loaderbuf, loadersize, &loaderhandle)) != EFI_SUCCESS) {
printf("Failed to load image provided by %s, size: %zu, (%lu)\n",
- mod->name, loadersize, EFI_ERROR_CODE(status));
+ mod->name, loadersize, DECODE_ERROR(status));
goto errout;
}
@@ -126,7 +126,7 @@ try_boot(const boot_module_t *mod, dev_info_t *dev, void *loaderbuf, size_t load
(void **)&loaded_image);
if (status != EFI_SUCCESS) {
printf("Failed to query LoadedImage provided by %s (%lu)\n",
- mod->name, EFI_ERROR_CODE(status));
+ mod->name, DECODE_ERROR(status));
goto errout;
}
@@ -152,7 +152,7 @@ try_boot(const boot_module_t *mod, dev_info_t *dev, void *loaderbuf, size_t load
if ((status = BS->StartImage(loaderhandle, NULL, NULL)) !=
EFI_SUCCESS) {
printf("Failed to start image provided by %s (%lu)\n",
- mod->name, EFI_ERROR_CODE(status));
+ mod->name, DECODE_ERROR(status));
loaded_image->LoadOptionsSize = 0;
loaded_image->LoadOptions = NULL;
}
@@ -254,7 +254,7 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab)
&DevicePathGUID, (void **)&imgpath);
if (status != EFI_SUCCESS) {
DPRINTF("Failed to get image DevicePath (%lu)\n",
- EFI_ERROR_CODE(status));
+ DECODE_ERROR(status));
} else {
text = efi_devpath_name(imgpath);
if (text != NULL) {
@@ -296,12 +296,14 @@ efi_exit(EFI_STATUS s)
BS->FreePages(heap, EFI_SIZE_TO_PAGES(heapsize));
BS->Exit(IH, s, 0, NULL);
+ __unreachable();
}
void
exit(int error)
{
efi_exit(errno_to_efi_status(error));
+ __unreachable();
}
/*
@@ -320,6 +322,7 @@ efi_panic(EFI_STATUS s, const char *fmt, ...)
printf("\n");
efi_exit(s);
+ __unreachable();
}
int getchar(void)
diff --git a/stand/efi/boot1/proto.c b/stand/efi/boot1/proto.c
index f81debd168b9..042a675f543d 100644
--- a/stand/efi/boot1/proto.c
+++ b/stand/efi/boot1/proto.c
@@ -68,7 +68,7 @@ probe_handle(EFI_HANDLE h, EFI_DEVICE_PATH *imgpath)
if (status != EFI_SUCCESS) {
DPRINTF("\nFailed to query DevicePath (%lu)\n",
- EFI_ERROR_CODE(status));
+ DECODE_ERROR(status));
return (-1);
}
#ifdef EFI_DEBUG
@@ -84,7 +84,7 @@ probe_handle(EFI_HANDLE h, EFI_DEVICE_PATH *imgpath)
if (status != EFI_SUCCESS) {
DPRINTF("\nFailed to query BlockIoProtocol (%lu)\n",
- EFI_ERROR_CODE(status));
+ DECODE_ERROR(status));
return (-1);
}
diff --git a/stand/efi/boot1/ufs_module.c b/stand/efi/boot1/ufs_module.c
index 0bdd5c018b06..e6c7c64c1e19 100644
--- a/stand/efi/boot1/ufs_module.c
+++ b/stand/efi/boot1/ufs_module.c
@@ -62,7 +62,7 @@ dskread(void *buf, uint64_t lba, int nblk)
DPRINTF("dskread: failed dev: %p, id: %u, lba: %ju, size: %d, "
"status: %lu\n", devinfo->dev,
devinfo->dev->Media->MediaId, (uintmax_t)lba, size,
- EFI_ERROR_CODE(status));
+ DECODE_ERROR(status));
return (-1);
}
diff --git a/stand/efi/boot1/zfs_module.c b/stand/efi/boot1/zfs_module.c
index 16722b33f0b9..f0cf28e8ce68 100644
--- a/stand/efi/boot1/zfs_module.c
+++ b/stand/efi/boot1/zfs_module.c
@@ -106,7 +106,7 @@ error:
DPRINTF("vdev_read: failed dev: %p, id: %u, lba: %ju, size: %zu,"
" rb_size: %zu, status: %lu\n", devinfo->dev,
devinfo->dev->Media->MediaId, (uintmax_t)lba, bytes, rb_size,
- EFI_ERROR_CODE(status));
+ DECODE_ERROR(status));
return (-1);
}