[U-Boot] [PATCH 1/1] efi_loader: bootefi hello should use loadaddr
Heinrich Schuchardt
xypron.glpk at gmx.de
Mon Aug 28 16:54:30 UTC 2017
Command 'bootefi hello' currently uses CONFIG_SYS_LOAD_ADDR
as loading address.
qemu machines have by default 128 MiB RAM.
CONFIG_SYS_LOAD_ADDR for x86 is 0x20000000 (512 MiB).
This causes 'bootefi hello' to fail.
We should use the environment variable loadaddr if available.
It defaults to 0x1000000 (16 MiB) on qemu_x86.
Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
cmd/bootefi.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index 47771f87cc..a3768158a2 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -300,7 +300,11 @@ static int do_bootefi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
if (!strcmp(argv[1], "hello")) {
ulong size = __efi_hello_world_end - __efi_hello_world_begin;
- addr = CONFIG_SYS_LOAD_ADDR;
+ saddr = env_get("loadaddr");
+ if (saddr)
+ addr = simple_strtoul(saddr, NULL, 16);
+ else
+ addr = CONFIG_SYS_LOAD_ADDR;
memcpy((char *)addr, __efi_hello_world_begin, size);
} else
#endif
--
2.11.0
More information about the U-Boot
mailing list