qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Valentin Manea <valentin.manea@gmail.com>
Cc: kwolf@redhat.com, Paolo Bonzini <pbonzini@redhat.com>,
	mjt@tls.msk.ru, "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH] IDE: MMIO IDE device control should be little endian
Date: Mon, 8 Sep 2014 10:07:56 +0100	[thread overview]
Message-ID: <20140908090756.GF7638@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <5402DD88.5010600@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1626 bytes --]

On Sun, Aug 31, 2014 at 11:32:08AM +0300, Valentin Manea wrote:
> 
> Set the IDE MMIO memory type to little endian. The ATA specs identify
> words part of the control commands encoded as little endian.
> While this has no impact on little endian systems, it's required for big
> endian systems(eg OpenRisc).
> 
> Signed-off-by: Valentin Manea <valentin.manea@gmail.com>
> ---
>  hw/ide/mmio.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c
> index 01c1d0e..334c8cc 100644
> --- a/hw/ide/mmio.c
> +++ b/hw/ide/mmio.c
> @@ -82,7 +82,7 @@ static void mmio_ide_write(void *opaque, hwaddr addr,
>  static const MemoryRegionOps mmio_ide_ops = {
>      .read = mmio_ide_read,
>      .write = mmio_ide_write,
> -    .endianness = DEVICE_NATIVE_ENDIAN,
> +    .endianness = DEVICE_LITTLE_ENDIAN,
>  };
> 
>  static uint64_t mmio_ide_status_read(void *opaque, hwaddr addr,
> @@ -102,7 +102,7 @@ static void mmio_ide_cmd_write(void *opaque, hwaddr
> addr,
>  static const MemoryRegionOps mmio_ide_cs_ops = {
>      .read = mmio_ide_status_read,
>      .write = mmio_ide_cmd_write,
> -    .endianness = DEVICE_NATIVE_ENDIAN,
> +    .endianness = DEVICE_LITTLE_ENDIAN,
>  };
> 
>  static const VMStateDescription vmstate_ide_mmio = {

This patch changes the semantics of the sh4eb target (with the r2d
machine type), where the mmio-ide registers currently don't need
byteswapping.

I guess a real big-endian SH4 with MMIO IDE *should* byteswap but want
to double-check.

Does anyone know what the expected behavior here is?

Stefan

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

  parent reply	other threads:[~2014-09-08  9:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <53F704BE.6000407@mrs.ro>
2014-08-22  9:22 ` [Qemu-devel] [PATCH] IDE: MMIO IDE device control should be little endian Peter Maydell
2014-08-24  9:24 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2014-08-28 11:13   ` Stefan Hajnoczi
2014-08-31  8:32     ` Valentin Manea
2014-08-31  8:32 ` [Qemu-devel] " Valentin Manea
2014-09-07 19:07   ` Valentin Manea
2014-09-08  8:52     ` Stefan Hajnoczi
2014-09-08  9:07   ` Stefan Hajnoczi [this message]
2014-09-08  9:11     ` Paolo Bonzini
2014-09-08 10:59     ` Michael Tokarev
2014-09-08 12:13     ` Peter Maydell
2014-09-09  8:58   ` Kevin Wolf
2014-09-09 19:18     ` Valentin Manea

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=20140908090756.GF7638@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=kwolf@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=valentin.manea@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 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).