From: Blue Swirl <blauwirbel@gmail.com>
To: Igor Kovalenko <igor.v.kovalenko@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Wrong IDE endianness
Date: Thu, 28 Jan 2010 21:59:55 +0000 [thread overview]
Message-ID: <f43fc5581001281359u625252bfrab2119cbc216922e@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1281 bytes --]
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 #2: 0001-Sparc64-change-the-location-of-byte-swapping.patch --]
[-- Type: application/x-patch, Size: 2659 bytes --]
[-- Attachment #3: 0001-QEMU-changed-PCI-IO-port-byte-swapping-adapt-OpenBI.patch --]
[-- Type: application/x-patch, Size: 4363 bytes --]
reply other threads:[~2010-01-28 22:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=f43fc5581001281359u625252bfrab2119cbc216922e@mail.gmail.com \
--to=blauwirbel@gmail.com \
--cc=igor.v.kovalenko@gmail.com \
--cc=qemu-devel@nongnu.org \
/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).