[U-Boot] enabling ecc on P2041 and QoreIQ familly not valid for memory >= 4GB

York Sun yorksun at freescale.com
Wed Jul 23 18:32:43 CEST 2014


Benoit,

If your interest is in initializing DDR for ECC, you don't have use
dma_meminit(). There is a better and faster way to do so. All Freescale modern
DDR controllers support this feature. All you have to do is to define these macros

CONFIG_DDR_ECC
CONFIG_ECC_INIT_VIA_DDRCONTROLLER
CONFIG_MEM_INIT_VALUE

There are plenty of example for you to follow.

But again, we should fix the DMA function anyway.

York


On 07/23/2014 12:21 AM, Benoit Sansoni wrote:
> Hi York,
> 
> That what I saw in the code.
> 
> Also to test it you need to have the hardware, but the evaluation board 
> P2041rdb for example does not have some ECC signals rooted for DIMM slot.
> I validated the patch that I sent on a board based on P2041 with 8GB of 
> memory. Obviously it works with 2GB and 4GB.
> 
> If you need help, you are welcome.
> 
> Thanks for your help
> Benoit
> 
> On 07/23/2014 12:53 AM, York Sun wrote:
>> On 07/18/2014 06:11 AM, Benoit Sansoni wrote:
>>> Hi ,
>>>
>>> I found out an issue when enabling ECC for P2041 platform with an amount
>>> of memory of 8GB.
>>> The routine "void dma_meminit(uint val, uint size)" is not adapted to
>>> manage memory size greater or equal to 4GB due to the 'uint' type.
>>> With this typing the dma_meminit sees 0 as size when memory is for
>>> example at 8GB. So the ECC part of the memory is not initialized and
>>> when going in memory the code crash.
>>> To correct it you need to use phys_size_t type instead of uint.
>>> It is the same thing for all routines that are called by "dma_meminit".
>>> I attached a patch that able to correct it easily.
>>> This patch should be integrated in the main branch I think so.
>>>
>>> Regards,
>>> Benoit
>>>
>> This is a valid concern. Some code started when we had far less memory. We need
>> to comb through the code to fix more of them.
>>
>> York
>>
>>
> 
> 



More information about the U-Boot mailing list