Skip to contentSkip to conversation

PATCH Nios2 kernel bootstrap error due to missing processor data cache flush: fix

U-Boot Renato Andreola 1 participant 1 message Aug 6, 2009

lore
Share & tools
lore
#0 lore raw

From caddbcecc99d7f96fdf7ca9c3d89ffac9cb999e1 Mon Sep 17 00:00:00 2001
From: Renato Andreola <[email protected]>
Date: Thu, 6 Aug 2009 11:03:19 +0200
Subject: Nios2: do_boom_linux(): kernel gunzip input data integrity
problem due to mi
ssing cache flush

Added instruction and data caches flush

---
  lib_nios2/bootm.c |    5 +++++
  1 files changed, 5 insertions(+), 0 deletions(-)
lib_nios2/bootm.c +1 -0
index 53fd569..65bb4cb 100644
@@ -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 ;-)
*/

Signature · 1 line
1.5.5