[U-Boot-Users] [Patch] Disable icache before call the first line of kernel in do_bootelf().

Sonic Zhang sonic.adi at gmail.com
Wed Aug 8 07:50:56 CEST 2007


On some architecture, it is not save to call the first line of kernel 
without disable the instruction cache. For do_bootm() path, architecture 
specific library code do_bootm_linux() can adress this issue, but 
do_bootelf() is common code. This patch disables icache before call kernel.


Signed-off-by: Sonic Zhang <sonic.zhang at gmail.com>

Index: common/cmd_elf.c
===================================================================
--- common/cmd_elf.c	(revision 871)
+++ common/cmd_elf.c	(working copy)
@@ -65,6 +65,8 @@
 	 */
 	if (dcache_status ())
 		dcache_disable ();
+	if (icache_status ())
+		icache_disable ();
 
 	/* pass cmdline to the kernel. */
 	cmdline = make_command_line();





More information about the U-Boot mailing list