Skip to contentSkip to conversation

IDE busmaster DMA support

Qemu-devel GaLi 3 participants 4 messages Sep 30, 2005

lore
Share & tools
lore

GaLi

author
#0 lore raw

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 ?

#1 lore raw

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

Quoted 24 lines · GaLi

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
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

author
#2 lore raw

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

Quoted 29 lines · Hetz Ben Hamo

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

Quoted 16 lines · GaLi

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 ?

#3 lore raw
In reply to GaLi
Quoted 9 lines · GaLi

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