nios: initialize malloc pool before start_barebox()
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
e91c960a5e
commit
bb80d9cd22
|
@ -150,8 +150,8 @@ _reloc:
|
|||
/*
|
||||
* Call board_init -- never returns
|
||||
*/
|
||||
movhi r4, %hi(start_barebox@h)
|
||||
ori r4, r4, %lo(start_barebox@h)
|
||||
movhi r4, %hi(nios_start_barebox@h)
|
||||
ori r4, r4, %lo(nios_start_barebox@h)
|
||||
callr r4
|
||||
|
||||
/* NEVER RETURNS -- but branch to the _start just
|
||||
|
|
|
@ -18,23 +18,19 @@
|
|||
|
||||
#include <common.h>
|
||||
#include <malloc.h>
|
||||
#include <init.h>
|
||||
#include <memory.h>
|
||||
#include <asm-generic/memory_layout.h>
|
||||
#include <cache.h>
|
||||
|
||||
int altera_mem_malloc_init(void)
|
||||
void __noreturn nios_start_barebox(void)
|
||||
{
|
||||
|
||||
mem_malloc_init((void *)(NIOS_SOPC_TEXT_BASE - MALLOC_SIZE),
|
||||
(void *)(NIOS_SOPC_TEXT_BASE - 1));
|
||||
|
||||
return 0;
|
||||
start_barebox();
|
||||
}
|
||||
|
||||
core_initcall(altera_mem_malloc_init);
|
||||
|
||||
void arch_shutdown(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue