
Hi Fabio,
On 10 November 2015 at 14:47, Fabio Estevam festevam@gmail.com wrote:
On Tue, Nov 10, 2015 at 7:29 PM, Simon Glass sjg@chromium.org wrote:
Are you able to check what is happening in malloc_simple()? It is a really simple function.
Yes, I turned on debug inside malloc_simple() and it returns NULL:
U-Boot SPL 2015.10-00523-ge490ad2-dirty (Nov 10 2015 - 19:44:06) malloc_simple: size=40, ptr=40, limit=1000 **** malloc_simple returns NULL ******* malloc returned NULL
map_sysmem() is returning NULL inside malloc_simple().
That suggests that gd->malloc_base is not being set up, or is being overwritten later. Presumably it should not be NULL?
Is it possible that you have a memset() somewhere which is zeroing gd? It would be after board_init_f_mem() and before your malloc().
Regards, Simon