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

Peter Tyser ptyser at xes-inc.com
Sat Sep 19 16:03:19 CEST 2009


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...

> 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,
but I'm not sure why this change should be included in this patch
series.

Best,
Peter



More information about the U-Boot mailing list