ARM newbie
I am doing my first port to an ARM CPU (Broadcom chip). For testing I built the friendlyarm-tiny210 and created an objdump to see what the code look like:
barebox: file format elf32-littlearm
Disassembly of section .text:
23e00000 <start>:23e00000: ea000012 b 23e00050 <start+0x50>
...23e00050: ea000013 b 23e000a4 <barebox_arm_reset_vector>
...
23e000a4 <barebox_arm_reset_vector>:23e000a4: e52de004 push {lr} ; (str lr, [sp, #-4]!)
I am a bit surprise to see a push to stack as the first instruction of barebox_arm_reset_vector as the stack pointer has not been defined yet. Or is there a pre boot loader that is not built as part of the friendlyarm-tiny210 build.
Other BSP I have built do not produce this push instruction. Where is the difference coming from in the build?
Are all BSP having a lowlevel.c file assumed to have a pre-bootloader?
Cheers,
R.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Hi Renaud,
Quoted 24 lines · Renaud Barbier
I am doing my first port to an ARM CPU (Broadcom chip). For testing I built the friendlyarm-tiny210 and created an objdump to see what the code look like:
barebox: file format elf32-littlearm
Disassembly of section .text:
23e00000<start>:23e00000:ea000012b23e00050<start+0x50>
...23e00050:ea000013b23e000a4<barebox_arm_reset_vector>
...
23e000a4<barebox_arm_reset_vector>:23e000a4:e52de004push {lr} ; (str lr, [sp, #-4]!)I am a bit surprise to see a push to stack as the first instruction of
barebox_arm_reset_vectoras the stack pointer has not been defined yet. Or is there a pre boot loader that is not built as part of the friendlyarm-tiny210 build.
Quoted 4 lines
Other BSP I have built do not produce this push instruction. Where is the difference coming from in the build?
Are all BSP having a
lowlevel.cfile assumed to have a pre-bootloader?
barebox_arm_reset_vector should have a __naked like the other boards have, then the stack won't be used. Does the board work? If yes then the stack pointer seems to be initialized with some value where it doesn't hurt to push to, but it doesn't look intentional.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox