From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nishanth Menon Date: Sat, 19 Sep 2009 10:37:58 -0500 Subject: [U-Boot] [PATCH 5/6] DLMALLOC:!X86: add av_ initialization In-Reply-To: <1253368999.27060.6.camel@ptyser-laptop> References: <1253326918-1670-1-git-send-email-nm@ti.com> <1253326918-1670-2-git-send-email-nm@ti.com> <1253326918-1670-3-git-send-email-nm@ti.com> <1253326918-1670-4-git-send-email-nm@ti.com> <1253326918-1670-5-git-send-email-nm@ti.com> <1253326918-1670-6-git-send-email-nm@ti.com> <1253368999.27060.6.camel@ptyser-laptop> Message-ID: <4AB4FAD6.20002@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > 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