All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] efi_loader: simplify running helloworld.efi
@ 2021-01-12 16:51 Heinrich Schuchardt
  0 siblings, 0 replies; only message in thread
From: Heinrich Schuchardt @ 2021-01-12 16:51 UTC (permalink / raw)
  To: u-boot

Currently when executing 'bootefi hello' we copy helloworld.efi to the
address identified by environment variable loadaddr. This is unexected
behavior for a user. There is no need to copy helloworld.efi before
executing it after relocation.

Remove the copy action.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 cmd/bootefi.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index ac520c3f9a..68ee0c8f32 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -403,19 +403,9 @@ static int do_bootefi_image(const char *image_opt)

 #ifdef CONFIG_CMD_BOOTEFI_HELLO
 	if (!strcmp(image_opt, "hello")) {
-		char *saddr;
-
-		saddr = env_get("loadaddr");
+		image_buf = __efi_helloworld_begin;
 		size = __efi_helloworld_end - __efi_helloworld_begin;

-		if (saddr)
-			addr = simple_strtoul(saddr, NULL, 16);
-		else
-			addr = CONFIG_SYS_LOAD_ADDR;
-
-		image_buf = map_sysmem(addr, size);
-		memcpy(image_buf, __efi_helloworld_begin, size);
-
 		efi_free_pool(bootefi_device_path);
 		efi_free_pool(bootefi_image_path);
 		bootefi_device_path = NULL;
--
2.29.2

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-12 16:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12 16:51 [PATCH 1/1] efi_loader: simplify running helloworld.efi Heinrich Schuchardt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.