Hi Wolfgang,

On Monday 16 May 2011 12:25 AM, Wolfgang Denk wrote:
> Dear Aneesh V,
>
> In message<1305202276-27784-6-git-send-email-ane...@ti.com>  you wrote:
>> - Enable I-cache on bootup
>> - Enable MMU and D-cache immediately after relocation
>>      - Do necessary initialization before enabling d-cache and MMU
>
> Would it be possible to do this even _before_ relocation, so to speed
> up memory accesses during relocation?  Of course, proper invalidates/
> flushes will be needed before jumping to the RAM address, but I guess
> this would save a bit of boot times?

I intentionally kept it after  relocation to avoid un-necessary 
complexities.
Relocation is a case of self-modifying code. In Harvard architectures
like armv7 there will be coherency issues unless we flush the entire
D-cache(range based operation may be equally or more expensive) and
invalidate the entire I-cache.

So, in effect everything has to be flushed to memory before you jump to
the new location. There may be a small advantage because flushing from
cache allows for bursting to the DDR where as bursting is not possible
when d-cache is disabled. But I think this is not worth the trouble.

best regards,
Aneesh
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to