[U-Boot] Enabling ARM DCache (and MMU setup) in U-Boot

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Tue Mar 31 14:21:51 CEST 2009


On 14:20 Tue 31 Mar     , Drasko DRASKOVIC wrote:
>    >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
AMIGAONE is a PPC

please take a look on this file
 lib_arm/bootm.c 
 and specialy on the  cleanup_before_linux (); soc implementation

>    >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.
U-Boot 1.1.6 is quite old (more than 2 years old) please try to the current version
is your SOC in the Mainline?
if you can tell us which one it's and if it is mainline in U-Boot or Linux?
we could take a look on the code
> 
>    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.
in linux yes in u-boot some arch do it but not the arm9
IMHO your boot problem is more in linux than in U-Boot but until we can take a
look on the code it will be hard to known

Best Regards,
J.


More information about the U-Boot mailing list