[U-Boot] U-Boot malloc implementation on arm - problem after relocation
Marcin Krzemiński
mar.krzeminski at gmail.com
Wed Oct 7 15:58:25 CEST 2015
Hello,
In my board I have some problems with malloc functionality. In config I
have settings for malloc:
#define CONFIG_SYS_MALLOC_LEN (2 * 1024 * 1024)
#define CONFIG_SYS_MALLOC_F_LEN (1024)
I am running u-boot without SPL. Uboot starts from SRAM and then relocates
to DRAM.
When I run u-boot from flash (_f functions ) I am opening spi to access one
sector from flash - that is why i need malloc in that phase.
After relocation first call of malloc cause u-boot to genrate data-access
exception. From my debugging it seems, that top pointer from dlmalloc is
still points to malloc region before relocation(SRAM). Since I use qemu it
is very hard to debug with gdb u-boot after relocation( or I do not know
how to do it), so I am almost blind.
Do you know what I am doing wrong?
Additionally I do not use CONFIG_NEEDS_MANUAL_RELOC since i do not need it
(or i think I do not need).
Regards,
Marcin
More information about the U-Boot
mailing list