[U-Boot-Users] simple_strtoul overwrites bd_info field
    Wolfgang Denk 
    wd at denx.de
       
    Wed Aug 30 10:14:13 CEST 2006
    
    
  
In message <44F54522.4010608 at dave-tech.it> you wrote:
>
> > Check the assembler code (single step it under a debugger).
> This is the offending instruction in simple_strtoul:
> *endp = (char *)cp;
> 
> 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()?
Did you check the generated assembler code as I suggested?
[Try "display/i $pc" followed by single-stepping using "si".]
Best regards,
Wolfgang Denk
-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
C++ is the best example of second-system effect since OS/360.
    
    
More information about the U-Boot
mailing list