mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Renaud Barbier <renaud.barbier@ge.com>
Cc: barebox@lists.infradead.org
Subject: Re: ARM newbie
Date: Fri, 23 Jan 2015 08:09:16 +0100	[thread overview]
Message-ID: <20150123070916.GU12209@pengutronix.de> (raw)
In-Reply-To: <54C0E4D4.2010402@ge.com>

Hi Renaud,

On Thu, Jan 22, 2015 at 11:53:56AM +0000, Renaud Barbier wrote:
> 
> 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?

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

-- 
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2015-01-23  7:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22 11:53 Renaud Barbier
2015-01-23  7:09 ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150123070916.GU12209@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=renaud.barbier@ge.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox