mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: "Barbier, Renaud" <renaud.barbier@abaco.com>,
	"barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: cortex-a9 boot issue
Date: Thu, 02 May 2019 12:21:52 +0200	[thread overview]
Message-ID: <1556792512.2590.5.camel@pengutronix.de> (raw)
In-Reply-To: <BYAPR16MB27449301E98456E00CC0EE32913B0@BYAPR16MB2744.namprd16.prod.outlook.com>

Hi Renaud,

Am Mittwoch, den 01.05.2019, 10:32 +0000 schrieb Barbier, Renaud:
> I have added support for a cortex-a9 off the master branch. 
> 
> I am seeing an issue to boot to the prompt found in the function
> hyp_install. The assembly code is as follows:
> 	mrs	r12, cpsr
> 	and	r12, r12, #MODE_MASK
> 
> 	@ Save the initial CPU state
> 	adr	r0, .L__boot_cpu_mode_offset
> 	ldr	r1, [r0]
> 	str	r12, [r0, r1]   ===> I get an exception here because
> the register r12 is being written to [r0 + r1] which points to the
> SPI NOR  boot flash.
> 
> Commenting out the call to all functions calling hyp_install, barebox
> does get to the prompt. 
> 
> Is there something I could be missing that would put the
> __boot_cpu_mode variable in a writable area?

No, this code was just not written with XIP in mind and I'm currently
no sure how to improve this, given how early this code needs to be
executed.

Regards,
Lucas

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2019-05-02 10:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-01 10:32 Barbier, Renaud
2019-05-02 10:21 ` Lucas Stach [this message]
2019-05-02 13:16   ` Barbier, Renaud

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=1556792512.2590.5.camel@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=renaud.barbier@abaco.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