* [U-Boot] Standalone API examples on the P4080DS
@ 2015-01-16 11:19 David George
2015-01-16 17:08 ` Peter Tyser
0 siblings, 1 reply; 3+ messages in thread
From: David George @ 2015-01-16 11:19 UTC (permalink / raw)
To: u-boot
Hi all,
I have compiled the hello_world standalone API example documented at
http://www.denx.de/wiki/view/DULG/UBootStandalone for the Freescale
P4080DS development board.
For the standalone api example hello_world, the tutorial (linked above)
states that the entry point of the application *is offset 4 bytes from
the start of the file* (I.E. address 0x40004).
With all build settings at default, my standalone base address is
0x40000 (defined in arch/powerpc/config.mk). This produces the following
object code:
00040000 <hello_world>:
40000: 94 21 ff e0 stwu r1,-32(r1)
40004: 7c 08 02 a6 mflr r0
40008: bf 61 00 0c stmw r27,12(r1)
4000c: 7c 7e 1b 78 mr r30,r3
40010: 7c 83 23 78 mr r3,r4
40014: 90 01 00 24 stw r0,36(r1)
It looks like the entry point is 0x40000. Why does the tutorial state
that the example needs to be run from a 4 byte offset? In this case this
will result in a failure to create a stack frame for hello_world.
Thanks!
Dave George
Stay informed by joining the Rapita Systems mailing list
http://www.rapitasystems.com/contact/mailing_list
For real-time verifications issues and discussion, follow the Rapita Systems blog
http://www.rapitasystems.com/blog
^ permalink raw reply [flat|nested] 3+ messages in thread* [U-Boot] Standalone API examples on the P4080DS 2015-01-16 11:19 [U-Boot] Standalone API examples on the P4080DS David George @ 2015-01-16 17:08 ` Peter Tyser 2015-01-20 14:54 ` David George 0 siblings, 1 reply; 3+ messages in thread From: Peter Tyser @ 2015-01-16 17:08 UTC (permalink / raw) To: u-boot Hi David, > It looks like the entry point is 0x40000. Why does the tutorial state > that the example needs to be run from a 4 byte offset? In this case > this > will result in a failure to create a stack frame for hello_world. For PowerPC the entry point used to be non-deterministic, but was generally 0x40004 which is where the wiki value came from. The following 2 patches made the entry point consistently 0x40000: http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=commit;h=620bbba524fbaa26971a5004793010b169824f1b http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=commit;h=c91d456c055237bdadb99a80e198748b8cf32595 I updated the wiki to match the newer 0x40000 address, which is valid for PowerPC boards with a comment to check out CONFIG_STANDALONE_LOAD_ADDR for other architectures. Peter ^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] Standalone API examples on the P4080DS 2015-01-16 17:08 ` Peter Tyser @ 2015-01-20 14:54 ` David George 0 siblings, 0 replies; 3+ messages in thread From: David George @ 2015-01-20 14:54 UTC (permalink / raw) To: u-boot Thank you very much for this Peter, it's much appreciated, and should hopefully stop anyone else falling into the same trap! Thanks! Dave George On 16/01/2015 17:08, Peter Tyser wrote: > Hi David, > > >> It looks like the entry point is 0x40000. Why does the tutorial state >> that the example needs to be run from a 4 byte offset? In this case >> this >> will result in a failure to create a stack frame for hello_world. > > For PowerPC the entry point used to be non-deterministic, but was > generally 0x40004 which is where the wiki value came from. The > following 2 patches made the entry point consistently 0x40000: > > http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=commit;h=620bbba524fbaa26971a5004793010b169824f1b > > http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=commit;h=c91d456c055237bdadb99a80e198748b8cf32595 > > I updated the wiki to match the newer 0x40000 address, which is valid > for PowerPC boards with a comment to check out > CONFIG_STANDALONE_LOAD_ADDR for other architectures. > > Peter > Stay informed by joining the Rapita Systems mailing list http://www.rapitasystems.com/contact/mailing_list For real-time verifications issues and discussion, follow the Rapita Systems blog http://www.rapitasystems.com/blog ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-20 14:54 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-01-16 11:19 [U-Boot] Standalone API examples on the P4080DS David George 2015-01-16 17:08 ` Peter Tyser 2015-01-20 14:54 ` David George
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox