
Robert Schwebel robert@schwebel.de schreibt:
On Mon, Sep 15, 2003 at 01:48:22PM +0200, Anders Larsen wrote:
It looks a lot like the PXA problem that bit me last week; _armboot_real_end is never initialized, so U-Boot crashes when start_armboot() calls mem_malloc_init(_armboot_real_end)!
Well, start_armboot() calls only _armboot_real_end when CONFIG_VFD is defined. Guess why -ptx has a nice warning in the sourcecode that this code has probably never run :-)
Hi Robert, start_armboot() references _armboot_real_end *regardless* of the setting of CONFIG_VFD, see lib_arm/board.c:
#ifdef CONFIG_VFD # ifndef PAGE_SIZE # define PAGE_SIZE 4096 # endif /* * reserve memory for VFD display (always full pages) */ /* armboot_real_end is defined in the board-specific linker script */ ! addr = (_armboot_real_end + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1); size = vfd_setmem (addr); gd->fb_base = addr; /* round to the next page boundary */ addr += size; addr = (addr + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1); mem_malloc_init (addr); #else /* armboot_real_end is defined in the board-specific linker script */ ! mem_malloc_init (_armboot_real_end); #endif /* CONFIG_VFD */
I'll submit a patch to fix this once and for all RSN...
That indeed would bring you the title "u-boot developer of the month" ;)
:-)
Cheers Anders