* [Qemu-devel] IDE busmaster DMA support
@ 2005-09-30 10:15 GaLi
2005-09-30 11:17 ` Hetz Ben Hamo
2005-09-30 15:16 ` Lennert Buytenhek
0 siblings, 2 replies; 6+ messages in thread
From: GaLi @ 2005-09-30 10:15 UTC (permalink / raw)
To: qemu-devel
Hi,
I'm trying to write an IDE driver with busmaster DMA support.
My problem is that I can't get the right controller registers addresses.
In the IDE BusMaster DMA specification :
"The control registers for the controller are allocated via the
devices Base Address register at offset 0x20 in PCI configuration
space."
If I read the word at offset 0x20 in the PCI configuration space, I get
0xc001. But if I boot qemu with a linux live-cd, it tells me that BM-DMA
is at 0xc000
Do I have to init the PCI IDE controller or something ?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] IDE busmaster DMA support
2005-09-30 10:15 [Qemu-devel] IDE busmaster DMA support GaLi
@ 2005-09-30 11:17 ` Hetz Ben Hamo
2005-09-30 12:20 ` GaLi
2005-09-30 15:16 ` Lennert Buytenhek
1 sibling, 1 reply; 6+ messages in thread
From: Hetz Ben Hamo @ 2005-09-30 11:17 UTC (permalink / raw)
To: qemu-devel
Hi,
Which IDE driver do u try to write? for QEMU? or for a guest OS?
The IDE implementation of QEMU has few bugs (notice how the hack win2k
installation needs), so I would suggest to you to either try it with
BOCHS or with a trial version of VMWare.
Thanks,
Hetz
On 9/30/05, GaLi <g_cavelier@yahoo.fr> wrote:
>
> Hi,
>
> I'm trying to write an IDE driver with busmaster DMA support.
> My problem is that I can't get the right controller registers addresses.
>
> In the IDE BusMaster DMA specification :
>
> "The control registers for the controller are allocated via the
> devices Base Address register at offset 0x20 in PCI configuration
> space."
>
> If I read the word at offset 0x20 in the PCI configuration space, I get
> 0xc001. But if I boot qemu with a linux live-cd, it tells me that BM-DMA
> is at 0xc000
>
> Do I have to init the PCI IDE controller or something ?
>
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] IDE busmaster DMA support
@ 2005-09-30 12:04 Juergen Keil
2005-09-30 13:00 ` GaLi
0 siblings, 1 reply; 6+ messages in thread
From: Juergen Keil @ 2005-09-30 12:04 UTC (permalink / raw)
To: qemu-devel
> I'm trying to write an IDE driver with busmaster DMA support.
> My problem is that I can't get the right controller registers addresses.
>
> In the IDE BusMaster DMA specification :
>
> "The control registers for the controller are allocated via the
> devices Base Address register at offset 0x20 in PCI configuration
> space."
>
> If I read the word at offset 0x20 in the PCI configuration space, I get
> 0xc001. But if I boot qemu with a linux live-cd, it tells me that BM-DMA
> is at 0xc000
>
> Do I have to init the PCI IDE controller or something ?
Bit 0 encodes if the registers are in IO (1) or in memory (0) space.
You get the IO base address by using a 0xfffffffe mask.
For memory space the mask is 0xfffffff0, the low four bits encode
a few memory properties (prefetch, 32-bit vs. 64-bit memory addresses).
See the PCI spec for more details. Or for example the PCI_BASE_* defines here:
http://cvs.opensolaris.org/source/xref/usr/src/uts/common/sys/pci.h#519
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] IDE busmaster DMA support
2005-09-30 11:17 ` Hetz Ben Hamo
@ 2005-09-30 12:20 ` GaLi
0 siblings, 0 replies; 6+ messages in thread
From: GaLi @ 2005-09-30 12:20 UTC (permalink / raw)
To: qemu-devel
It's an IDE driver for my own OS.
I don't think it comes from qemu because linux get it right. I tried to
read linux source code but it's way too complicated.
I'll try in bochs and VMWare and tell you the results
Hetz Ben Hamo wrote:
> Hi,
>
> Which IDE driver do u try to write? for QEMU? or for a guest OS?
>
> The IDE implementation of QEMU has few bugs (notice how the hack win2k
> installation needs), so I would suggest to you to either try it with
> BOCHS or with a trial version of VMWare.
>
> Thanks,
> Hetz
>
> On 9/30/05, GaLi <g_cavelier@yahoo.fr> wrote:
>
>>Hi,
>>
>>I'm trying to write an IDE driver with busmaster DMA support.
>>My problem is that I can't get the right controller registers addresses.
>>
>>In the IDE BusMaster DMA specification :
>>
>>"The control registers for the controller are allocated via the
>>devices Base Address register at offset 0x20 in PCI configuration
>>space."
>>
>>If I read the word at offset 0x20 in the PCI configuration space, I get
>>0xc001. But if I boot qemu with a linux live-cd, it tells me that BM-DMA
>>is at 0xc000
>>
>>Do I have to init the PCI IDE controller or something ?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] IDE busmaster DMA support
2005-09-30 12:04 Juergen Keil
@ 2005-09-30 13:00 ` GaLi
0 siblings, 0 replies; 6+ messages in thread
From: GaLi @ 2005-09-30 13:00 UTC (permalink / raw)
To: qemu-devel
OK, thank you very much.
GaLi
Juergen Keil wrote:
>>I'm trying to write an IDE driver with busmaster DMA support.
>>My problem is that I can't get the right controller registers addresses.
>>
>>In the IDE BusMaster DMA specification :
>>
>>"The control registers for the controller are allocated via the
>>devices Base Address register at offset 0x20 in PCI configuration
>>space."
>>
>>If I read the word at offset 0x20 in the PCI configuration space, I get
>>0xc001. But if I boot qemu with a linux live-cd, it tells me that BM-DMA
>>is at 0xc000
>>
>>Do I have to init the PCI IDE controller or something ?
>
>
> Bit 0 encodes if the registers are in IO (1) or in memory (0) space.
> You get the IO base address by using a 0xfffffffe mask.
>
> For memory space the mask is 0xfffffff0, the low four bits encode
> a few memory properties (prefetch, 32-bit vs. 64-bit memory addresses).
>
> See the PCI spec for more details. Or for example the PCI_BASE_* defines here:
>
> http://cvs.opensolaris.org/source/xref/usr/src/uts/common/sys/pci.h#519
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] IDE busmaster DMA support
2005-09-30 10:15 [Qemu-devel] IDE busmaster DMA support GaLi
2005-09-30 11:17 ` Hetz Ben Hamo
@ 2005-09-30 15:16 ` Lennert Buytenhek
1 sibling, 0 replies; 6+ messages in thread
From: Lennert Buytenhek @ 2005-09-30 15:16 UTC (permalink / raw)
To: qemu-devel
On Fri, Sep 30, 2005 at 12:15:04PM +0200, GaLi wrote:
> In the IDE BusMaster DMA specification :
>
> "The control registers for the controller are allocated via the
> devices Base Address register at offset 0x20 in PCI configuration
> space."
>
> If I read the word at offset 0x20 in the PCI configuration space, I get
> 0xc001. But if I boot qemu with a linux live-cd, it tells me that BM-DMA
> is at 0xc000
If the least significant bit in a BAR is 1, it means that you're
dealing with I/O space (as opposed to memory space.) For BARs
referencing I/O space, the upper 30 bits encode the address, and
for memory space BARs, the upper 28 bits encode the address.
So, 0xc001 means "I/O space BAR, base address 0xc000."
--L
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-09-30 15:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-30 10:15 [Qemu-devel] IDE busmaster DMA support GaLi
2005-09-30 11:17 ` Hetz Ben Hamo
2005-09-30 12:20 ` GaLi
2005-09-30 15:16 ` Lennert Buytenhek
-- strict thread matches above, loose matches on Subject: below --
2005-09-30 12:04 Juergen Keil
2005-09-30 13:00 ` GaLi
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).