qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Wrong IDE endianness


From: Blue Swirl
Subject: [Qemu-devel] Wrong IDE endianness
Date: Thu, 28 Jan 2010 21:59:55 +0000

I'm wondering about this part:
cmd64x 0000:00:05.0: 100% native mode on irq 1
    ide0: BM-DMA at 0x1fe02000700-0x1fe02000707
    ide1: BM-DMA at 0x1fe02000708-0x1fe0200070f
hda: EQUMH RADDSI K, ATA DISK drive
hdc: EQUMD DVR-MO, ATAPI cdrom or floppy?, assuming FLOPPY drive

Why the drive names are swapped?

Currently bytes are swapped at APB/PBM PCI config,
apb_pci_config_readw etc. Actual data goes via pci_apb_iowritew etc
unswapped.

Now, I tried to change this so that instead of just
apb_pci_config_readw, pci_apb_iowritew and friends do swapping
globally for all IO ports. This would require also a few changes to
OpenBIOS, patches attached. But Linux is even less happy:

cmd64x 0000:00:05.0: IDE controller (0x1095:0x0646 rev 0x01)
cmd64x 0000:00:05.0: unable to enable IDE controller
cmd64x 0000:00:05.0: IDE controller (0x1095:0x0646 rev 0x01)
CMD64x_IDE 0000:00:05.0: BAR 0: can't reserve I/O region
[0x1fe02000500-0x1fe02000507]
cmd64x 0000:00:05.0: can't reserve resources
CMD64x_IDE: probe of 0000:00:05.0 failed with error -16

So I don't think this approach is correct either.

It could be possible that individual devices would need byte swaps.
But CMD64x is used successfully also on PPC and the same code is used
for both Sparc64 and PPC OpenBIOS and Linux.

Attachment: 0001-Sparc64-change-the-location-of-byte-swapping.patch
Description: Source code patch

Attachment: 0001-QEMU-changed-PCI-IO-port-byte-swapping-adapt-OpenBI.patch
Description: Source code patch


reply via email to

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