Skip to content
Snippets Groups Projects
Commit 51c533fd authored by Heinrich Schuchardt's avatar Heinrich Schuchardt Committed by Alexander Graf
Browse files

efi_loader: bootefi hello should use loadaddr


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: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
parent c07f3820
No related branches found
No related tags found
Loading
......@@ -299,7 +299,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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment