summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorDiana CRACIUN <Diana.Craciun@freescale.com>2011-08-31 02:45:23 +0000
committerWolfgang Denk <wd@denx.de>2011-09-05 16:07:44 +0200
commit99ffccbd3e5b7bc715e2eed6ea6d36f4020b56d8 (patch)
treee7a052f7678d7d86acbbfd0bf4d70385d99477ff /common
parent019fd6d45b611193610e3366392c53a817c3cee2 (diff)
downloadu-boot-imx-99ffccbd3e5b7bc715e2eed6ea6d36f4020b56d8.zip
u-boot-imx-99ffccbd3e5b7bc715e2eed6ea6d36f4020b56d8.tar.gz
u-boot-imx-99ffccbd3e5b7bc715e2eed6ea6d36f4020b56d8.tar.bz2
Flush cache after the OS image is loaded into the memory.
Since we are loading an executable image into memory we need flush it out of the cache to possible maintain coherence on CPUs with split instruction and data caches. We do this for other executable image loading command. On PowerPC once we do this we no longer need to explicitly flush the dcache on multi-core systems in the BOOTM_STATE_OS_PREP phase. We now treat the BOOTM_STATE_OS_PREP as a no-op to maintain backwards compatibility with the bootm subcommand. Signed-off-by: James Yang <James.Yang@freescale.com> Signed-off-by: Diana CRACIUN <Diana.Craciun@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_bootm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 272d879..8909ee7 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -432,6 +432,9 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)
printf ("Unimplemented compression type %d\n", comp);
return BOOTM_ERR_UNIMPLEMENTED;
}
+
+ flush_cache(load, (*load_end - load) * sizeof(ulong));
+
puts ("OK\n");
debug (" kernel loaded at 0x%08lx, end = 0x%08lx\n", load, *load_end);
if (boot_progress)