mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-28 23:50:26 +09:00
sh: Set gd->malloc_base if MALLOC_F_LEN is set
The gd->malloc_base must be set before the C runtime if the MALLOC_F_LEN is non-zero, otherwise we hit assertion in dlmalloc.c initf_malloc(). So set it. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
This commit is contained in:
parent
7bee46fd40
commit
3223ca99ee
@ -53,7 +53,10 @@ _start:
|
|||||||
|
|
||||||
mov.l ._gd_init, r13 /* global data */
|
mov.l ._gd_init, r13 /* global data */
|
||||||
mov.l ._stack_init, r15 /* stack */
|
mov.l ._stack_init, r15 /* stack */
|
||||||
|
#if CONFIG_VAL(SYS_MALLOC_F_LEN)
|
||||||
|
mov.l ._gd_malloc_base, r14
|
||||||
|
mov.l r15, @r14
|
||||||
|
#endif
|
||||||
mov.l ._sh_generic_init, r0
|
mov.l ._sh_generic_init, r0
|
||||||
jsr @r0
|
jsr @r0
|
||||||
mov #0, r4
|
mov #0, r4
|
||||||
@ -70,5 +73,8 @@ loop:
|
|||||||
._bss_start: .long bss_start
|
._bss_start: .long bss_start
|
||||||
._bss_end: .long bss_end
|
._bss_end: .long bss_end
|
||||||
._gd_init: .long (_start - GENERATED_GBL_DATA_SIZE)
|
._gd_init: .long (_start - GENERATED_GBL_DATA_SIZE)
|
||||||
|
#if CONFIG_VAL(SYS_MALLOC_F_LEN)
|
||||||
|
._gd_malloc_base: .long (_start - GENERATED_GBL_DATA_SIZE + GD_MALLOC_BASE)
|
||||||
|
#endif
|
||||||
._stack_init: .long (_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16)
|
._stack_init: .long (_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16)
|
||||||
._sh_generic_init: .long board_init_f
|
._sh_generic_init: .long board_init_f
|
||||||
|
Loading…
Reference in New Issue
Block a user