summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSudeep Holla <Sudeep.Holla@arm.com>2015-07-10 17:18:44 +0100
committerSimon Glass <sjg@chromium.org>2015-07-20 07:21:47 -0600
commit8a133bb5ba12275c80d75114a230dab5102936de (patch)
tree0e65adda0fd0d78f6893537f9994319813f9523f /common
parentb1d9e46a0b89054e1a702e757612f87a907bf7a9 (diff)
cmd_fdt: save fdtaddr in hex format
Commit 90fbee3e4051 ("cmd_fdt: Actually fix fdt command in sandbox") changed the format(from hex address to unsigned long) in which "fdtaddr" is saved . However do_fdt continues reads the "fdtaddr" assuming it to be in hex format. This may lead to fdt being either loaded or attempted to load at erroneous address generating fault if the address is out of memory. This patch changes back the format to hex while saving the "fdtaddr" as it was done before. Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org> Cc: Hua Yanghao <huayanghao@gmail.com> Cc: Heiko Schocher <hs@denx.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_fdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c
index 682b6553958..4c18962d853 100644
--- a/common/cmd_fdt.c
+++ b/common/cmd_fdt.c
@@ -45,7 +45,7 @@ void set_working_fdt_addr(ulong addr)
buf = map_sysmem(addr, 0);
working_fdt = buf;
- setenv_ulong("fdtaddr", addr);
+ setenv_hex("fdtaddr", addr);
}
/*