[U-Boot] Cache function change breaks zmx25

Matthias Weisser weisserm at arcor.de
Sat Dec 10 17:36:53 CET 2011


Am 09.12.2011 16:03, schrieb Ilya Yanok:
> Hi Matthias,
> 
> On 09.12.2011 18:24, Matthias Weißer wrote:
>> breaks zmx25 booting with the following command:
>>
>> tftpboot 0x82000000 foo.img; dcache on; bootm 0x82000000
>>
>> It is stuck then in an endless loop after dcache is disabled before
>> jumping to the OS.
>>
>> ------------------------------------------------
>> WARNING: cache operations are not implemented!
>> WARNING: disabling D-Cache now, you can re-enable itlater with 'dcache
>> on' command
>> ------------------------------------------------
> 
> Argh.. That's really bad. May I ask you to debug this a little bit?
>
> What is exact cache function being called? Where from?
> How comes that dcache_status() returns true after dcache_disable()? Or
> does somebody call dcache_enable() in between?

The call trace in may case should be something like (not debuged, only
looked at the code):

cmd_elf.c    : do_bootelf()
cmd_elf.c    : do_bootelf_exec()
cache-cp15.c : dcache_disable()
cache-cp15.c : cache_disable(CR_C); -> Cache is not disabled in this
                                     function before
cache.c      : flush_dcache_all();   is called
cache.c      : dcache_noop();
cache-cp15.c : dcache_status() -> returns true
cache-cp15.c : dcache_disable()
cache-cp15.c : cache_disable(CR_C)
cache.c      : flush_dcache_all();
....

And we have the endless loop. I think this impacts not only zmx25 but
other boards enabling dcache.

If you need additional informations: I will have access to the board on
monday again.

-- 
Matthias


More information about the U-Boot mailing list