All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: HyonYoung Choi <commani@gmail.com>,
	Andre Przywara <andre.przywara@linaro.org>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Cc: Meng Xu <xumengpanda@gmail.com>
Subject: Re: undefined instruction error during HYP mode switch for arndale-octa board
Date: Mon, 21 Apr 2014 13:39:18 +0100	[thread overview]
Message-ID: <53551176.5070005@linaro.org> (raw)
In-Reply-To: <CAFpecnS+Rb8q8scAsWHVeN6-8qLWd51tyxFK0M=88qz_LNjH+Q@mail.gmail.com>

Hello HyonYoung,

On 18/04/14 22:26, HyonYoung Choi wrote:
> I am trying to port xen to arndale-octa board.
>
> I am using u-boot modified for arndale-octa
> from tracking-arndale_octa branch of
> http://landing-teams/working/samsung/u-boot.git
>
> Because there is no HYP mode switch code in the u-boot,
> I tried to port your code in
> http://git.linaro.org/git/people/andre.przywara/u-boot.git.
> I also put debug code.
>
> In booting, it reboot infinitely with following error message:
> ======================
>     switch_hyp: GIC dist enabled
>    switch_hyp: 224 interrupts supportd
>    switch_hyp: all interrupts switched to non-secure
>    switch_hyp: setting SP start start address (0x9f86d6b4)
>    switch_hyp: kicked all CPUs
>    VBAR before: 0x9f86c000
> undefined instruction
> pc : [<9f86d748>]          lr : [<9f86d600>]
> sp : 9f7638c0  ip : 0000000f     fp : 9f86e4b4
> r10: 9f8ad294  r9 : 00000000     r8 : 9f763f10
> r7 : 00000000  r6 : ffffffff     r5 : 00000007  r4 : 9f86c000
> r3 : 10482000  r2 : 10480000     r1 : 016e3600  r0 : 00010000
> Flags: nZCv  IRQs off  FIQs off  Mode SVC_32
> Resetting CPU ...
> ========================
>
> The problematic code is "mcr     p15, 0, r1, c1, c1, 2"
> in arch/arm/cpu/armv7/nonsec_virt.S , nonsec_init function
> Do you have any idea about this error?

U-boot is trying to write into NSCAR. This register is only writeable in 
Secure PL1 mode.

I suspect U-boot is running in non-secure mode. You may have the same 
problem as the odroid-xu where the SPL BL2 code brings up CPU in NS mode 
(see http://www.gossamer-threads.com/lists/xen/devel/325364#325364).

Regards,

-- 
Julien Grall

  reply	other threads:[~2014-04-21 12:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-18 21:26 undefined instruction error during HYP mode switch for arndale-octa board HyonYoung Choi
2014-04-21 12:39 ` Julien Grall [this message]
2014-04-21 23:11   ` HyonYoung Choi
2014-04-22 14:09     ` Julien Grall
2014-04-29  3:18       ` Tushar Behera
2014-04-29  3:18       ` Tushar Behera

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=53551176.5070005@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=andre.przywara@linaro.org \
    --cc=commani@gmail.com \
    --cc=xen-devel@lists.xen.org \
    --cc=xumengpanda@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.