diff options
author | Simon Glass <sjg@chromium.org> | 2016-02-24 09:14:42 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-02-26 08:53:10 -0700 |
commit | 7a80de464167ec45fdb70f63d83d07f7c2c57b82 (patch) | |
tree | fd70b67850d122106608b94979f9de99804755ad /common/bootm.c | |
parent | 24862c640ea50ac88be343161eb681bea5dbfeef (diff) |
image: Correct the OS location code to work on sandbox
A recent change broke the 'bootm' command on sandbox. The root cause is
using a pointer as an address. Conversion from pointer to address needs to
use map_to_sysmem() so that sandbox can do the right thing. The problem was
pre-existing but uncovered by a recent commit.
Fix this. Also move fit_get_end() to the C file to avoid needing to include
mapmem.h (and thus asm/io.h) everywhere.
Fixes: 1fec3c5d (common/image.c: Make boot_get_ramdisk() perform a check for Android images)
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/bootm.c')
-rw-r--r-- | common/bootm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/bootm.c b/common/bootm.c index 99d574db2c..df27089965 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -201,7 +201,7 @@ static int bootm_find_os(cmd_tbl_t *cmdtp, int flag, int argc, images.ep += images.os.load; } - images.os.start = (ulong)os_hdr; + images.os.start = map_to_sysmem(os_hdr); return 0; } |