[U-Boot] [PATCH 5/6] DLMALLOC:!X86: add av_ initialization

Nishanth Menon menon.nishanth at gmail.com
Sat Sep 19 17:37:58 CEST 2009


Peter Tyser said the following on 09/19/2009 09:03 AM:
> On Fri, 2009-09-18 at 21:21 -0500, Nishanth Menon wrote:
>   
>> This is questionable if this is really required
>> as the av_ static initalized values should have
>> been loaded to sdram as part of the boot process
>> and initialization should have been done.
>>     
>
> Is there a reason you need to do this fixup?  Based on your commit
> message its unclear if this patch is really needed...
>
>   
Essentially, the loaded memory from the NOR looks all corrupted.
I am unable to convince myself why the SDRAM is not updated
with the static default inits - SDRAM corruption would have
cracked everything else and scope measurement looks good too.
>> Signed-off-by: Nishanth Menon <nm
>>  void mem_malloc_init(ulong start, ulong size)
>>  {
>> +	u8 i;
>> +	av_[0] = av_[1] = 0;
>> +	for (i = 0; i < 128; i++)
>> +		av_[2 + i * 2] = av_[2 + i * 2 + 1] = bin_at(i);
>> +
>>  	mem_malloc_start = start;
>>  	mem_malloc_end = start + size;
>>  	mem_malloc_brk = start;
>>     
>
> If you are going to do this fixup, av_ should not be initialized with
> values (you're currently doing the same initialization 2 times).  In
> general, we could probably shave a bit off of U-Boot's size by leaving
> av_ uninitialized and implementing your manual calculation of av_ above,
>   
yep.. missed finishing that out.. :(
> but I'm not sure why this change should be included in this patch
> series.
>   
This patch is need for booting SDP3430 from NOR flash.

Regards,
Nishanth Menon


More information about the U-Boot mailing list