From dd5d82a599953945e881fdd1f9dd8227c1232ae7 Mon Sep 17 00:00:00 2001 From: Adriano Cordova Date: Mon, 3 Mar 2025 11:13:15 -0300 Subject: efi_loader: efi_net: Add device path cache In preparation to support mutiple efi net udevices. Add a device path cache to support device paths from multiple ethernet udevices. The device paths can be added to the cache before EFI gets initialized and the protocols get installed. Signed-off-by: Adriano Cordova --- lib/efi_loader/efi_device_path.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/efi_loader/efi_device_path.c') diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c index 64183d40340..c9bf2726fe2 100644 --- a/lib/efi_loader/efi_device_path.c +++ b/lib/efi_loader/efi_device_path.c @@ -1048,7 +1048,7 @@ struct efi_device_path *efi_dp_from_http(const char *server, struct udevice *dev (!server && IS_ENABLED(CONFIG_NET_LWIP))) return NULL; - efi_net_get_addr(&ip, &mask, NULL); + efi_net_get_addr(&ip, &mask, NULL, dev); dp1 = efi_dp_from_ipv4(&ip, &mask, NULL, dev); if (!dp1) @@ -1189,8 +1189,8 @@ efi_status_t efi_dp_from_name(const char *dev, const char *devnr, dp = efi_dp_from_mem(EFI_RESERVED_MEMORY_TYPE, (uintptr_t)image_addr, image_size); } else if (IS_ENABLED(CONFIG_NETDEVICES) && - (!strcmp(dev, "Net") || !strcmp(dev, "Http"))) { - efi_net_get_dp(&dp); + (!strcmp(dev, "Net") || !strcmp(dev, "Http"))) { + efi_net_dp_from_dev(&dp, eth_get_dev(), false); } else if (!strcmp(dev, "Uart")) { dp = efi_dp_from_uart(); } else { -- cgit v1.2.3