* [U-Boot] U-Boot timer example crashes on EP88xC
@ 2009-06-23 22:18 Mikhail Zaturenskiy
2009-06-24 13:26 ` Detlev Zundel
0 siblings, 1 reply; 4+ messages in thread
From: Mikhail Zaturenskiy @ 2009-06-23 22:18 UTC (permalink / raw)
To: u-boot
Hello,
I am using ELDK 4.2 and U-Boot 2009.03 on an EP88xC rev1.1 board
(MPC885 cpu) and am trying to get the example apps working (the ones
that come with U-Boot) following instructions on
"http://www.denx.de/wiki/view/DULG/UBootStandalone#Section_5.12.2.".
"examples/hello_world.bin" worked fine:
=> tftp 40000 ep88x_helloworld
Trying FEC ETHERNET
Using FEC ETHERNET device
TFTP from server 10.0.54.129; our IP address is 10.0.54.150
Filename 'ep88x_helloworld'.
Load address: 0x40000
Loading: ##################
done
Bytes transferred = 262980 (40344 hex)
=> go 40004
## Starting application at 0x00040004 ...
Example expects ABI version 4
Actual U-Boot ABI version 4
Hello World
argc = 1
argv[0] = "40004"
argv[1] = "<NULL>"
Hit any key to exit ...
## Application terminated, rc = 0x0
=>
But things didn't go too smoothly with the "examples/timer.bin" app:
=> tftp 40000 ep88x_timerdemo
Trying FEC ETHERNET
Using FEC ETHERNET device
TFTP from server 10.0.54.129; our IP address is 10.0.54.150
Filename 'ep88x_timerdemo'.
Load address: 0x40000
Loading: ##################
done
Bytes transferred = 263740 (4063c hex)
=> go 40004
## Starting application at 0x00040004 ...
.Bus Fault @ 0x00040038, fixup 0x00000000
Machine check in kernel mode.
Caused by (from msr): regs 03f70cd8 Unknown values in msr
NIP: 00040038 XER: A000B700 LR: 00040030 REGS: 03f70cd8 TRAP: 0200 DAR: C4B38E78
MSR: 00009002 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 00
GPR00: 00000003 03F70DC8 03F70F8C 00000000 03F70C84 03F70C78 FFFFFFFF 03F70C00
GPR08: 00000041 C4B38E78 00000000 03FE2EBC 00000030 00000001 03FFF000 00000000
GPR16: 03FF58BC 03FF82C8 00000000 00000000 00000000 00000000 00000000 00000000
GPR24: 00000000 03FB11C8 00000000 00000000 03FB127C 00000001 00088608 00000002
Call backtrace:
machine check
### ERROR ### Please RESET the board ###
Does anybody have any suggestions for what may be wrong here?
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] U-Boot timer example crashes on EP88xC
2009-06-23 22:18 [U-Boot] U-Boot timer example crashes on EP88xC Mikhail Zaturenskiy
@ 2009-06-24 13:26 ` Detlev Zundel
2009-06-24 14:13 ` Mikhail Zaturenskiy
0 siblings, 1 reply; 4+ messages in thread
From: Detlev Zundel @ 2009-06-24 13:26 UTC (permalink / raw)
To: u-boot
Hi Mikhail,
> I am using ELDK 4.2 and U-Boot 2009.03 on an EP88xC rev1.1 board
> (MPC885 cpu) and am trying to get the example apps working (the ones
> that come with U-Boot) following instructions on
> "http://www.denx.de/wiki/view/DULG/UBootStandalone#Section_5.12.2.".
>
> "examples/hello_world.bin" worked fine:
[...]
> But things didn't go too smoothly with the "examples/timer.bin" app:
>
> => tftp 40000 ep88x_timerdemo
> Trying FEC ETHERNET
> Using FEC ETHERNET device
> TFTP from server 10.0.54.129; our IP address is 10.0.54.150
> Filename 'ep88x_timerdemo'.
> Load address: 0x40000
> Loading: ##################
> done
> Bytes transferred = 263740 (4063c hex)
> => go 40004
> ## Starting application at 0x00040004 ...
Oh huh - this would imply that the "timer" routine got linked to this
address. When I use objdump to deassemble the object file, it seems
that "timer" is at 40108. Try "go 0x40108" and read the FAQ[1] ;)
Cheers
Detlev
[1] http://www.denx.de/wiki/view/DULG/MyStandaloneProgramDoesNotWork
--
NAN - No Acronym Neccessary
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] U-Boot timer example crashes on EP88xC
2009-06-24 13:26 ` Detlev Zundel
@ 2009-06-24 14:13 ` Mikhail Zaturenskiy
2009-06-24 16:16 ` Detlev Zundel
0 siblings, 1 reply; 4+ messages in thread
From: Mikhail Zaturenskiy @ 2009-06-24 14:13 UTC (permalink / raw)
To: u-boot
> When I use objdump to deassemble the object file, it seems
> that "timer" is at 40108. Try "go 0x40108" and read the FAQ[1] ;)
>
> Cheers
> Detlev
>
> [1] http://www.denx.de/wiki/view/DULG/MyStandaloneProgramDoesNotWork
>
>
"go 0x40108" did it, thanks! And thanks for the FAQ reference, knowing
this will be definitely useful in the future.
Why does the documentation say to use 0x40004? I have not made any
changes to the timer program, is it different because the example uses
the SREC version of the file and I'm using the binary?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] U-Boot timer example crashes on EP88xC
2009-06-24 14:13 ` Mikhail Zaturenskiy
@ 2009-06-24 16:16 ` Detlev Zundel
0 siblings, 0 replies; 4+ messages in thread
From: Detlev Zundel @ 2009-06-24 16:16 UTC (permalink / raw)
To: u-boot
Hi Mikhail,
>> When I use objdump to deassemble the object file, it seems
>> that "timer" is at 40108. Try "go 0x40108" and read the FAQ[1] ;)
>>
>> Cheers
>> Detlev
>>
>> [1] http://www.denx.de/wiki/view/DULG/MyStandaloneProgramDoesNotWork
>>
>>
>
> "go 0x40108" did it, thanks! And thanks for the FAQ reference, knowing
> this will be definitely useful in the future.
>
> Why does the documentation say to use 0x40004?
The documentation _was_ correct at some point in time. Obviously the
situation changed.
The "real" problem is that we currently do not exactly specify the
memory layout for the examples elf files. To be deterministic we would
need to have a linker script which puts the intended function onto the
correct offset. This has not been done and with previous toolchains the
examples worked (more or less) like expected.
Obviously nobody used the timer example recently ;)
> I have not made any changes to the timer program, is it different
> because the example uses the SREC version of the file and I'm using
> the binary?
No this is not a problem - as mentioned above it is the contents of the
elf file which is "not according to expectation".
For the fun of it you could try to come up with a linker script for
powerpc also. This should get at least the text segment at the intended
place. How to order functions in there I'm not so sure. Maybe use
attributes to define a specific text segment at the beginning and then
mark the "main" function with this attribute.
You're welcome to play here ;)
Cheers
Detlev
--
Indeed, the author firmly believes that the best serious work is also
good fun. We needn't apologize if we enjoy doing research.
-- Donald Knuth
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-06-24 16:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-23 22:18 [U-Boot] U-Boot timer example crashes on EP88xC Mikhail Zaturenskiy
2009-06-24 13:26 ` Detlev Zundel
2009-06-24 14:13 ` Mikhail Zaturenskiy
2009-06-24 16:16 ` Detlev Zundel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox