[U-Boot] [PATCH 5/6] DLMALLOC:!X86: add av_ initialization
Nishanth Menon
nm at ti.com
Sat Sep 19 04:21:57 CEST 2009
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.
Signed-off-by: Nishanth Menon <nm at ti.com>
---
common/dlmalloc.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/common/dlmalloc.c b/common/dlmalloc.c
index 241db8c..bd509db 100644
--- a/common/dlmalloc.c
+++ b/common/dlmalloc.c
@@ -1527,6 +1527,11 @@ void *sbrk(ptrdiff_t increment)
*/
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;
--
1.6.0.4
More information about the U-Boot
mailing list