summaryrefslogtreecommitdiff
path: root/lib_nios2
diff options
context:
space:
mode:
authorRenato Andreola <renato.andreola@imagos.it>2009-11-23 16:45:14 -0500
committerScott McNutt <smcnutt@psyent.com>2009-11-23 16:45:14 -0500
commit0a7691e820e33b23f61c6ea0ef6fa72099d1a6ae (patch)
tree7cbdc3e5c33192a7fb3cd7f0157231dca09fa1df /lib_nios2
parentde03825386eaedb5e17261dd87cde86e9a764ba9 (diff)
Nios2: do_boom_linux(): kernel gunzip input data integrity problem due to
missing cache flush. Added instruction and data caches flush. Signed-off-by: Scott McNutt <smcnutt@psyent.com>
Diffstat (limited to 'lib_nios2')
-rw-r--r--lib_nios2/bootm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib_nios2/bootm.c b/lib_nios2/bootm.c
index 53fd5691ad7..675bfac63a5 100644
--- a/lib_nios2/bootm.c
+++ b/lib_nios2/bootm.c
@@ -24,6 +24,7 @@
#include <common.h>
#include <command.h>
#include <asm/byteorder.h>
+#include <asm/cache.h>
int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
{
@@ -32,6 +33,10 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
return 1;
+ /* flushes data and instruction caches before calling the kernel */
+ flush_dcache (0,CONFIG_SYS_DCACHE_SIZE);
+ flush_icache (0,CONFIG_SYS_ICACHE_SIZE);
+
/* For now we assume the Microtronix linux ... which only
* needs to be called ;-)
*/