* [Qemu-devel] PCNet-PCI I/O ops byte order
@ 2013-08-29 20:56 Oleksandr Tymoshenko
2013-08-30 5:57 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Oleksandr Tymoshenko @ 2013-08-29 20:56 UTC (permalink / raw)
To: qemu-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] PCNet-PCI I/O ops byte order
2013-08-29 20:56 [Qemu-devel] PCNet-PCI I/O ops byte order Oleksandr Tymoshenko
@ 2013-08-30 5:57 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2013-08-30 5:57 UTC (permalink / raw)
To: Oleksandr Tymoshenko; +Cc: qemu-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-30 5:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-29 20:56 [Qemu-devel] PCNet-PCI I/O ops byte order Oleksandr Tymoshenko
2013-08-30 5:57 ` Paolo Bonzini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.