summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-05-12 20:18:10 +0200
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-05-13 11:09:51 +0200
commit01c528118d1fd9bdfaad57ca803094d1b697401d (patch)
tree5bdb3073d48863f668d8817c621c54334632df13
parent31eda3f55ce788e1c885f38c3afad6f4db60f13e (diff)
downloadu-boot-01c528118d1fd9bdfaad57ca803094d1b697401d.tar.gz
efi_loader: support booting semihosting file
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>
-rw-r--r--lib/efi_loader/efi_device_path.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
index e2e98a39be..20ad948498 100644
--- a/lib/efi_loader/efi_device_path.c
+++ b/lib/efi_loader/efi_device_path.c
@@ -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)