
On Mon, Mar 30, 2009 at 10:31 PM, Jean-Christophe PLAGNIOL-VILLARD wrote: before booting linux you must disable the cache which will be re-enable by linux.
OK. Is that done in bootm.c? I can see lines : /* * We have reached the point of no return: we are going to * overwrite all exception vector code, so we cannot easily * recover from any failures any more... */
iflag = disable_interrupts();
#ifdef CONFIG_AMIGAONEG3SE /* * We've possible left the caches enabled during * bios emulation, so turn them off again */ icache_disable(); invalidate_l1_instruction_cache(); flush_data_cache(); dcache_disable(); #endif
Looks like only interrupts are disabled, and caches only in the case of AMIGAONE (whatever that might be). There are no other calls to cache_disable functions. I already use ICache, and cmd_bootm.c like presented (thus no call to icache_disable() here), and it works. Only that copying image from Flash is slow, so I want to speed it up with enablilng DCache.
Could you give us more details about your soc, u-boot verison and linux version
u-boot-1.1.6, linux version is linux-2.6.25.10, although that is not important because I have no problem with this but with slow access to Flash and SDRAM, as I said before. Core is ARM926.
As I understand, these things have to be set up in the order to enable DCache :
1. Page tables 2. The Translation Lookaside Buffer (TLB) 3. Domains and access permission 4. Caches and write buffer 5. The CP15:c1 control register 6. The Fast Context Switch Extension
Now, that seems like a lot of work to be done, and reading manual is not extremely helpful, so I was wondering if somebody already done similar thing in U-Boot, for ARM9 platform, so I could reuse some work or examine examples to figure out how this is done.
Best regards, Drasko