From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFHiK-0006TW-Dx for qemu-devel@nongnu.org; Fri, 30 Aug 2013 01:57:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VFHiB-0004ku-L7 for qemu-devel@nongnu.org; Fri, 30 Aug 2013 01:57:44 -0400 Received: from mail-ee0-x230.google.com ([2a00:1450:4013:c00::230]:54896) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFHiB-0004ko-FI for qemu-devel@nongnu.org; Fri, 30 Aug 2013 01:57:35 -0400 Received: by mail-ee0-f48.google.com with SMTP id l10so666943eei.7 for ; Thu, 29 Aug 2013 22:57:34 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <52203448.1080101@redhat.com> Date: Fri, 30 Aug 2013 07:57:28 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <4C818617-784B-4685-B98C-44E9AFFBD8B8@bluezbox.com> In-Reply-To: <4C818617-784B-4685-B98C-44E9AFFBD8B8@bluezbox.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] PCNet-PCI I/O ops byte order List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Oleksandr Tymoshenko Cc: qemu-devel@nongnu.org Il 29/08/2013 22:56, Oleksandr Tymoshenko ha scritto: > Hello, > > I'm working on QEMU/mips support for FreeBSD. qemu-system-mipsel works > just fine but I ran into a problem with qemu-system-mips. There are two > devices on PCI bus in MALTA machine emulation. ATA IDE controller and > PCNet NIC: hw/ide/pci.c and hw/net/pcnet-pci.c respectively. Problem is > I/O ops byte order for these two devices are defined inconsistently. > It's DEVICE_LITTLE_ENDIAN for bmdma_addr_ioport_ops and > DEVICE_NATIVE_ENDIAN for pcnet_io_ops. And since byte swapping > in my case performed by bus driver I can't get consistent behaviour > for these devices on big-endian system. > > I don't have real hardware to run my code on but shouldn't all devices > on PCI bus treat words as little endian? > > Thank you Yes, you are right. Aurelien Jarno just posted a patch to use DEVICE_LITTLE_ENDIAN for pcnet_io_ops. Paolo