diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2017-08-28 18:54:30 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2017-09-18 23:53:56 +0200 |
commit | 51c533fdce75fbdec7de28a05a675a553d209bcb (patch) | |
tree | b636af5fb5541fdca1f0bfd290ae6296a9e0e259 /cmd | |
parent | c07f38208a73bbe3efaa939d6742096c1cb7e0ce (diff) | |
download | u-boot-51c533fdce75fbdec7de28a05a675a553d209bcb.tar.gz u-boot-51c533fdce75fbdec7de28a05a675a553d209bcb.tar.xz u-boot-51c533fdce75fbdec7de28a05a675a553d209bcb.zip |
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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/bootefi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/bootefi.c b/cmd/bootefi.c index 3196d86040..c65c619d63 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -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 |