From: Anders Larsen Date: Mon, 15 Sep 2003 14:58:51 +0200 Subject: [U-Boot-Users] data abort In-Reply-To: <20030915125130.GX8367@pengutronix.de> References: <20030915112918.28A8CC59E4@atlas.denx.de> <20030915125130.GX8367@pengutronix.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Robert Schwebel 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