diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/Kconfig | 9 | ||||
-rw-r--r-- | lib/efi_loader/efi_device_path.c | 18 |
2 files changed, 9 insertions, 18 deletions
diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index c7027a9676..21ef440341 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -1,11 +1,16 @@ config EFI_LOADER bool "Support running UEFI applications" - depends on (ARM || X86 || RISCV || SANDBOX) && OF_LIBFDT + depends on OF_LIBFDT && ( \ + ARM && (SYS_CPU = arm1136 || \ + SYS_CPU = arm1176 || \ + SYS_CPU = armv7 || \ + SYS_CPU = armv8) || \ + X86 || RISCV || SANDBOX) # We need EFI_STUB_64BIT to be set on x86_64 with EFI_STUB depends on !EFI_STUB || !X86_64 || EFI_STUB_64BIT # We need EFI_STUB_32BIT to be set on x86_32 with EFI_STUB depends on !EFI_STUB || !X86 || X86_64 || EFI_STUB_32BIT - default y + default y if !ARM || SYS_CPU = armv7 || SYS_CPU = armv8 select LIB_UUID select HAVE_BLOCK_DEVICE select REGEX diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c index 17a0c5bb45..73f1fe75a8 100644 --- a/lib/efi_loader/efi_device_path.c +++ b/lib/efi_loader/efi_device_path.c @@ -422,7 +422,7 @@ bool efi_dp_is_multi_instance(const struct efi_device_path *dp) /* size of device-path not including END node for device and all parents * up to the root device. */ -static unsigned dp_size(struct udevice *dev) +__maybe_unused static unsigned int dp_size(struct udevice *dev) { if (!dev || !dev->driver) return sizeof(ROOT); @@ -494,7 +494,7 @@ static unsigned dp_size(struct udevice *dev) * @dev device * @return pointer to the end of the device path */ -static void *dp_fill(void *buf, struct udevice *dev) +__maybe_unused static void *dp_fill(void *buf, struct udevice *dev) { if (!dev || !dev->driver) return buf; @@ -654,20 +654,6 @@ static void *dp_fill(void *buf, struct udevice *dev) return dp_fill(buf, dev->parent); } } - -/* Construct a device-path from a device: */ -struct efi_device_path *efi_dp_from_dev(struct udevice *dev) -{ - void *buf, *start; - - start = buf = dp_alloc(dp_size(dev) + sizeof(END)); - if (!buf) - return NULL; - buf = dp_fill(buf, dev); - *((struct efi_device_path *)buf) = END; - - return start; -} #endif static unsigned dp_part_size(struct blk_desc *desc, int part) |