]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: support booting semihosting file
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 12 May 2023 18:18:10 +0000 (20:18 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 13 May 2023 09:09:51 +0000 (11:09 +0200)
Executing an EFI binary fails for files loaded via semihosting.

Construct a dummy device path for EFI binaries loaded via semihosting.

A future complete solution may include the creation of a handle with a
simple file system protocol.

Reported-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
lib/efi_loader/efi_device_path.c

index e2e98a39be151b61b6ce526bf4213d3a2112b01f..20ad9484985239331d5f1710fb162f367d2870dc 100644 (file)
@@ -1203,7 +1203,8 @@ efi_status_t efi_dp_from_name(const char *dev, const char *devnr,
        } else if (!strcmp(dev, "Uart")) {
                if (device)
                        *device = efi_dp_from_uart();
-       } else if (!strcmp(dev, "Mem")) {
+       } else if (!strcmp(dev, "Mem") || !strcmp(dev, "hostfs"))  {
+               /* loadm command and semihosting */
                efi_get_image_parameters(&image_addr, &image_size);
 
                if (device)