From mboxrd@z Thu Jan 1 00:00:00 1970 From: llandre Date: Wed, 30 Aug 2006 10:38:18 +0200 Subject: [U-Boot-Users] simple_strtoul overwrites bd_info field In-Reply-To: <20060830081413.D1B8D352627@atlas.denx.de> References: <20060830081413.D1B8D352627@atlas.denx.de> Message-ID: <44F54E7A.7050105@dave-tech.it> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de >> As endp points to one field of the struct bd_info, it gets corrupted. So > > Umm.. it should not. endp is the second art when calling > simple_strtoul(), and "lib_arm/board.c" passes the address of a local > variable here. > >> the problem is about the pointer "e" in function start_armboot that is >> passed to simple_strtoul. Any idea? > > Did you check which address gets passed to simple_strtoul()? Yes and ... > Did you check the generated assembler code as I suggested? ... yes. This is how I found out what happens. See the two dumps here http://www.dave-tech.it/download/misc/zefeer. Stuct bd_info starts at 0xD1EBFF3C. -- llandre DAVE Electronics System House - R&D Department web: http://www.dave-tech.it email: r&d2 at dave-tech.it