/* The malloc area is right below the monitor image in RAM */
mem_malloc_init(CONFIG_SYS_MONITOR_BASE + gd->reloc_off -
CONFIG_SYS_MALLOC_LEN, CONFIG_SYS_MALLOC_LEN);
- malloc_bin_reloc();
dma_alloc_init();
enable_interrupts();
/* The Malloc area is immediately below the monitor copy in DRAM */
mem_malloc_init (CONFIG_SYS_MONITOR_BASE + gd->reloc_off -
TOTAL_MALLOC_LEN, TOTAL_MALLOC_LEN);
- malloc_bin_reloc ();
#if !defined(CONFIG_SYS_NO_FLASH)
puts ("Flash: ");
/* The Malloc area is immediately below the monitor copy in DRAM */
malloc_start = dest_addr - TOTAL_MALLOC_LEN;
mem_malloc_init(malloc_start, TOTAL_MALLOC_LEN);
- malloc_bin_reloc();
#ifndef CONFIG_SYS_NO_FLASH
/* configure available FLASH banks */
/* The Malloc area is immediately below the monitor copy in RAM */
mem_malloc_init(CONFIG_SYS_MALLOC_BASE,
CONFIG_SYS_MALLOC_END - CONFIG_SYS_MALLOC_BASE);
- malloc_bin_reloc();
#if !defined(CONFIG_SYS_NO_FLASH)
puts("Flash: ");
};
#ifdef CONFIG_NEEDS_MANUAL_RELOC
-void malloc_bin_reloc (void)
+static void malloc_bin_reloc(void)
{
mbinptr *p = &av_[2];
size_t i;
for (i = 2; i < ARRAY_SIZE(av_); ++i, ++p)
*p = (mbinptr)((ulong)*p + gd->reloc_off);
}
+#else
+static inline void malloc_bin_reloc(void) {}
#endif
ulong mem_malloc_start = 0;
mem_malloc_brk = start;
memset((void *)mem_malloc_start, 0, size);
+
+ malloc_bin_reloc();
}
/* field-extraction macros */
extern ulong mem_malloc_brk;
void mem_malloc_init(ulong start, ulong size);
-void malloc_bin_reloc(void);
#ifdef __cplusplus
}; /* end of extern "C" */