qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] IDE: MMIO IDE device control should be little e


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] IDE: MMIO IDE device control should be little endian
Date: Mon, 8 Sep 2014 10:07:56 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

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 <address@hidden>
> ---
>  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: pgpxxGDtcdbbX.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]