public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] efi_loader: EFI file paths should be DOS style
@ 2017-07-24 11:59 Rob Clark
  2017-07-24 11:59 ` [U-Boot] [PATCH] efi_loader: log EFI return values too Rob Clark
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Rob Clark @ 2017-07-24 11:59 UTC (permalink / raw)
  To: u-boot

shim.efi, for example, actually tries to parse this, but is expecting
backslashes.

Signed-off-by: Rob Clark <robdclark@gmail.com>
---
 cmd/bootefi.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index b6d5047301..689eb09942 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -379,7 +379,7 @@ static int parse_partnum(const char *devnr)
 void efi_set_bootdev(const char *dev, const char *devnr, const char *path)
 {
 	char devname[32] = { 0 }; /* dp->str is u16[32] long */
-	char *colon;
+	char *colon, *s;
 
 #if defined(CONFIG_BLK) || CONFIG_IS_ENABLED(ISO_PARTITION)
 	desc = blk_get_dev(dev, simple_strtol(devnr, NULL, 10));
@@ -431,6 +431,10 @@ void efi_set_bootdev(const char *dev, const char *devnr, const char *path)
 	} else {
 		snprintf(devname, sizeof(devname), "%s", path);
 	}
+	/* DOS style file path: */
+	s = devname;
+	while ((s = strchr(s, '/')))
+		*s++ = '\\';
 	ascii2unicode(bootefi_image_path[0].str, devname);
 
 	loaded_image_info.device_handle = real_bootefi_device_path;
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [U-Boot] [PATCH] efi_loader: log EFI return values too
@ 2017-07-24 14:31 Rob Clark
  0 siblings, 0 replies; 9+ messages in thread
From: Rob Clark @ 2017-07-24 14:31 UTC (permalink / raw)
  To: u-boot

Turns out this is rather useful to tracking down where things fail.

Signed-off-by: Rob Clark <robdclark@gmail.com>
---
v2: use EFI_ERROR_MASK

 include/efi_loader.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/efi_loader.h b/include/efi_loader.h
index 40e0f1dbd7..a8df44fdb6 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -20,7 +20,10 @@
 	debug("EFI: Entry %s(" format ")\n", __func__, ##__VA_ARGS__); \
 	} while(0)
 
-#define EFI_EXIT(ret) efi_exit_func(ret);
+#define EFI_EXIT(ret) ({ \
+	debug("EFI: Exit: %s: %u\n", __func__, (u32)((ret) & ~EFI_ERROR_MASK)); \
+	efi_exit_func(ret); \
+	})
 
 extern struct efi_runtime_services efi_runtime_services;
 extern struct efi_system_table systab;
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-07-28 22:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-24 11:59 [U-Boot] [PATCH] efi_loader: EFI file paths should be DOS style Rob Clark
2017-07-24 11:59 ` [U-Boot] [PATCH] efi_loader: log EFI return values too Rob Clark
2017-07-24 12:36   ` Alexander Graf
2017-07-24 12:53     ` Rob Clark
2017-07-24 13:05       ` Alexander Graf
2017-07-24 11:59 ` [U-Boot] [PATCH] efi_loader: move guidcmp to header Rob Clark
2017-07-28 22:25   ` [U-Boot] " Alexander Graf
2017-07-28 22:28 ` [U-Boot] efi_loader: EFI file paths should be DOS style Alexander Graf
  -- strict thread matches above, loose matches on Subject: below --
2017-07-24 14:31 [U-Boot] [PATCH] efi_loader: log EFI return values too Rob Clark

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox