All of lore.kernel.org
 help / color / mirror / Atom feed
From: Renato Andreola <renato.andreola@imagos.it>
To: u-boot@lists.denx.de
Subject: [U-Boot] PATCH Nios2 kernel bootstrap error due to missing processor data cache flush: fix
Date: Thu, 06 Aug 2009 11:26:26 +0200	[thread overview]
Message-ID: <4A7AA1C2.8010507@imagos.it> (raw)

 From caddbcecc99d7f96fdf7ca9c3d89ffac9cb999e1 Mon Sep 17 00:00:00 2001
From: Renato Andreola <renato.andreola@imagos.it>
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

    Signed-off-by: Renato Andreola <renato.andreola@imagos.it>

---
  lib_nios2/bootm.c |    5 +++++
  1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/lib_nios2/bootm.c b/lib_nios2/bootm.c
index 53fd569..65bb4cb 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 ;-)
  	 */
-- 
1.5.5

             reply	other threads:[~2009-08-06  9:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-06  9:26 Renato Andreola [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-04-10 12:21 [U-Boot] PATCH Nios2 kernel bootstrap error due to missing processor data cache flush: fix Renato Andreola
2009-07-17 22:13 ` Wolfgang Denk
2009-11-22 20:12 ` Wolfgang Denk
2009-11-23 21:52   ` Scott McNutt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A7AA1C2.8010507@imagos.it \
    --to=renato.andreola@imagos.it \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.