qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm <qemu-arm@nongnu.org>, "Tom Rini" <trini@konsulko.com>,
	"Michal Simek" <michal.simek@xilinx.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Stephen Warren" <swarren@wwwdotorg.org>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] target/arm: Allow to switch from MON->HYP on AArch32
Date: Wed, 9 Jan 2019 18:14:10 +0100	[thread overview]
Message-ID: <92dba7da-f3fc-b7dc-6896-cf8d58cc7f17@suse.de> (raw)
In-Reply-To: <CAFEAcA8Xzi8GjzUtzxbFzxdCS4kn0Cps+_bF70ZS0KnH0W8SvQ@mail.gmail.com>

On 01/09/2019 05:59 PM, Peter Maydell wrote:
> On Wed, 9 Jan 2019 at 16:52, Peter Maydell <peter.maydell@linaro.org> wrote:
>> On Wed, 9 Jan 2019 at 15:26, Alexander Graf <agraf@suse.de> wrote:
>>> In U-boot, we switch from S-SVC -> MON -> HYP when we want to enter
>>> HYP mode. This dance seems to work ok (hence it's there in the code
>>> base), but breaks with current QEMU.
> PS: it would be helpful if the commit message said how u-boot
> is trying to go from Mon to Hyp -- some ways to try to do
> this are OK, and some are not, so whether it's supposed to
> work or not depends on what u-boot is actually doing...

I don't fully understand all of it to be honest :). But the code is here:

http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/cpu/armv7/nonsec_virt.S

What I managed to understand so far is that it goes to MON using the smc 
#0 call and then changes SPSR so that on return (movs pc) the mode will 
be different.

But please double check whether this is supposed to work - I don't find 
mode switching on ARM terribly intuitive ;).


Alex

  reply	other threads:[~2019-01-09 17:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-09 15:24 [Qemu-devel] [PATCH] target/arm: Allow to switch from MON->HYP on AArch32 Alexander Graf
2019-01-09 16:10 ` Alex Bennée
2019-01-09 16:19   ` Alexander Graf
2019-01-09 16:35   ` [Qemu-devel] [Qemu-arm] " Peter Maydell
2019-01-09 16:52 ` [Qemu-devel] " Peter Maydell
2019-01-09 16:59   ` Peter Maydell
2019-01-09 17:14     ` Alexander Graf [this message]
2019-01-09 23:08       ` Peter Maydell
2019-01-10  6:43         ` Alexander Graf
2019-01-10 10:34           ` Peter Maydell
2019-01-17 18:43             ` Peter Maydell

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=92dba7da-f3fc-b7dc-6896-cf8d58cc7f17@suse.de \
    --to=agraf@suse.de \
    --cc=alex.bennee@linaro.org \
    --cc=michal.simek@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=swarren@wwwdotorg.org \
    --cc=trini@konsulko.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;
as well as URLs for NNTP newsgroup(s).