[U-Boot] [PATCH V1 1/1] MX5: Keep L2 cache enabled before jump to kernel

Albert ARIBAUD albert.u.boot at aribaud.net
Sat Apr 16 11:55:56 CEST 2011


Le 15/04/2011 17:55, Jason Liu a écrit :
> Hi, Stefano,
>
> 2011/4/15 Stefano Babic<sbabic at denx.de>:
>> On 04/13/2011 03:25 PM, Jason Liu wrote:
>>
>> Hi Jason,
>>
>>> Currently, Linux kernel does not do any L2 cache enable
>>> Operation.So,Keep L2 cache enabled(L2EN=1) in the u-boot
>>> before Jump to the Linux Kernel and thus L2 cache can be
>>> effectively used in Linux Kernel.
>>
>> If the cache is not active in the kernel for MX5, this should be fixed
>> in the kernel for this architecture. Normally, cache is activated inside
>> the kernel itself, as I cann see for other architectures and other ARMV7
>> processors (omap)
>
> Here the cache is L2 cache. I have observed that if uboot does not enable it,
> then L2 cache will not get enabled through current ARM linux core code.

Which still does not tell us why Linux should depend on some bootloader 
for enabling L2 cache. If Linux does not enable L2 cache, there is a 
reason and we should not enable the L2 cache in Linux' back; 
conversively, if Linux wants L2 cache enabled, then let Linux do it.

> And for the uboot itself it provide the following code in cpu.c to
> enable L2 cache
> before jump to linux kernel, and this code maybe implemented by omap guys:
> If linux kernel already enabled it, then there is no need for the L2
> related code here?

Turning caches OFF before jumping to Linux is a sane thing to do. 
Re-enabling it, on the other hand, bears no reason that I can discern, 
because Linux can do it just as well, and it is better if Linux does it 
because it will do it exactly where and when it is ready for it, and 
because this removes a dependency between Linux and the bootloader, 
which is a Good Thing (tm).

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list