qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: Fabien Chouteau <chouteau@adacore.com>
Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org, afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH 4/4] target-arm: always set endian bits in big-endian mode
Date: Mon, 4 Mar 2013 13:24:52 +0000	[thread overview]
Message-ID: <201303041324.52962.paul@codesourcery.com> (raw)
In-Reply-To: <513477C1.5080505@adacore.com>

> On 03/01/2013 09:58 PM, Paul Brook wrote:
> >> +#ifdef TARGET_WORDS_BIGENDIAN
> >> +    if (arm_feature(env, ARM_FEATURE_V6)
> >> +        || arm_feature(env, ARM_FEATURE_V7)) {
> >> +        /* IE and EE bits stay set for big-endian */
> >> +        env->cp15.c1_sys |= (1 << 31) | (1 << 25);
> >> +    }
> >> +#endif
> > 
> > This is wrong for all the CPUs QEMU crrently supports. SCTLR.IE is
> > defined to be zero.
> 
> Again I'd like to have more information. Why is it wrong to set IE when
> we are in big-endian?

The ARM architecture defines two big-endian modes.  In BE8 mode only data 
accesses big-endian, code fetches are still little-endian.  In BE32 mode both 
code and data are big-endian.  In theory a fourth mode (big-endian code, 
little-endian data) exists, though I've never seen that used.

All the v7 cores QEMU currently supports[1] only implement BE8 mode.  The IE 
bit is reserved and most be zero.  Usermode emulation implements both, but the 
privileged cp15 registers can safely be ignored there.

Paul

[1] Except maybe the M profile cores, but they use a different system model 
anyway.

  reply	other threads:[~2013-03-04 13:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-01 17:21 [Qemu-devel] [PATCH 0/4] ARM: Misc ARM big-endian bug fixes Fabien Chouteau
2013-03-01 17:21 ` [Qemu-devel] [PATCH 1/4] QAPI: Add ARMEB target-type Fabien Chouteau
2013-03-01 17:21 ` [Qemu-devel] [PATCH 2/4] Add default config for armeb-softmmu Fabien Chouteau
2013-03-01 17:21 ` [Qemu-devel] [PATCH 3/4] target-arm: Fix VFP register byte order in GDB remote Fabien Chouteau
2013-03-01 20:51   ` Paul Brook
2013-03-04 10:03     ` Fabien Chouteau
2013-03-04 13:30       ` Paul Brook
2013-03-04 17:31         ` Fabien Chouteau
     [not found]           ` <201303042334.02147.paul@codesourcery.com>
2013-03-05 10:59             ` Fabien Chouteau
2013-03-01 17:21 ` [Qemu-devel] [PATCH 4/4] target-arm: always set endian bits in big-endian mode Fabien Chouteau
2013-03-01 20:58   ` Paul Brook
2013-03-04 10:30     ` Fabien Chouteau
2013-03-04 13:24       ` Paul Brook [this message]
2013-03-05 10:56         ` Fabien Chouteau
2013-03-05 12:33           ` Peter Maydell
2013-03-05 15:07             ` Fabien Chouteau
2013-03-05 23:08               ` Peter Maydell
2013-03-06 17:39                 ` Fabien Chouteau

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=201303041324.52962.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=afaerber@suse.de \
    --cc=chouteau@adacore.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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).