[PATCH 1/1] efi_loader: pass end address to efi_dp_from_mem in efi_dp_from_name
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Wed Oct 30 22:02:27 CET 2024
efi_dp_from_mem() expects the last parameter to be the end address and not
the size.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
lib/efi_loader/efi_device_path.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
index 9de3b95d073..d7444588aa0 100644
--- a/lib/efi_loader/efi_device_path.c
+++ b/lib/efi_loader/efi_device_path.c
@@ -1073,7 +1073,8 @@ efi_status_t efi_dp_from_name(const char *dev, const char *devnr,
efi_get_image_parameters(&image_addr, &image_size);
dp = efi_dp_from_mem(EFI_RESERVED_MEMORY_TYPE,
- (uintptr_t)image_addr, image_size);
+ (uintptr_t)image_addr,
+ (uintptr_t)image_addr + image_size);
} else if (IS_ENABLED(CONFIG_NETDEVICES) && !strcmp(dev, "Net")) {
dp = efi_dp_from_eth();
} else if (!strcmp(dev, "Uart")) {
--
2.45.2
More information about the U-Boot
mailing list