[U-Boot] [PATCH] ARM v7: Flush icache when executing a program with go

Wolfgang Denk wd at denx.de
Sun Nov 25 18:41:20 CET 2012


Dear Henrik Nordström,

In message <1353842010.17518.3.camel at home.hno.se> you wrote:
> ARM v7 runs with icache enabled. For reliable results the go command
> needs to flush the icache before jumping or it may risk running
> cached instructions that differ from what currently is in memory.

This should never be an architecutre specific thing.  Whether we flush
caches or not should be the same on all architectures.

> +#ifdef CONFIG_CMD_GO
> +unsigned long do_go_exec(ulong (*entry)(int, char * const []), int argc,
> +				 char * const argv[])
> +{
> +	invalidate_icache_all();
> +	return entry(argc, argv);
> +}

We really need a prototype for this function in a global header file.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
An armed society is a polite society.


More information about the U-Boot mailing list