[U-Boot-Users] simple_strtoul overwrites bd_info field
Wolfgang Denk
wd at denx.de
Wed Aug 30 12:13:00 CEST 2006
In message <44F54E7A.7050105 at dave-tech.it> you wrote:
>
> > Did you check which address gets passed to simple_strtoul()?
> Yes and ...
If I understand your screen shots correctly, then D1EBFF60 gets
passed (in r1) as second argument to simple_strtoul(). Is this
understanding correct? Did you verify that is this indeed the address
of the local valiable "e"?
> > 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.
In the second screen shot, the address D1EBFF22 gets used (in r14).
Unfortunately your section does not allow to follow the code, i. e.
how does the correct (?) content of r1 gets lost and/or changed into
the wrong content of r14.
I can only repeat: check the code on assembler instuction level.
In message <44F551D6.7070904 at dave-tech.it> you wrote:
> I tried to move the e pointer from start_armboot to the top of the file
> (static char *e;) and everything works fine.
This cannot be accepted as solution for the problem. I see absolutely
no reason why the current code [cs]ould cause problems here.
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
"One planet is all you get."
More information about the U-Boot
mailing list