IDE - DMA

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
n_sethu

IDE - DMA

Post by n_sethu »

Hi

How to enable an IDE device to run in DMA mode using a program. Thanx in
advance.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:IDE - DMA

Post by Pype.Clicker »

that sounds rather a vague question ... especially the "using a program" part ...

does this helps ?
n_sethu

Re:IDE - DMA

Post by n_sethu »

I shall put the query in another way. I have written a program to read data from IDE in DMA mode. The DMA is enabled properly. But my IRQ handler is unable to detect the reqest. Can anyone suggest what may be the reason and how we can rectify it.

Thanx in advance.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:IDE - DMA

Post by Pype.Clicker »

hmm ... are you talkin' about legacy DMA (single or multiword) or about PCI ultraDMA ?

Can you see the data moving in memory (for instance by inspecting the buffer content on keypress) ? If not, probably your DMA is not that well-configured ...

oh, and just to make sure ... is the PIC correctly configured aswell (on both slave and master PICs ?)
n_sethu

Re:IDE - DMA

Post by n_sethu »

I have set the IRQ and DMA properly. Im able to read data from a floppy in the legacy DMA (single) mode. Also, Im able to read IDE in PIO mode perfectly (It doesnt use IRQ). But unable with DMA mode.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:IDE - DMA

Post by Pype.Clicker »

sorry, but IDE read *do* use an IRQ, even in PIO mode. The "PIO data-in command protocol" (in section 9.5 of ATAPI docs is quit explicit about that ...
Cemre

Re:IDE - DMA

Post by Cemre »

configuring the legacy DMA controller ( 8237A ) doesn't work on new IDE drives, you have to ( at least i had to ) do a pci scan and find a IDE controller, ( my card is via chipset ) this via ide controller is the dma controller for legacy ide ports, you have to program those ports, NOT standart 0x00-0x0F and other 16bit standart dma controller.
n_sethu

Re:IDE - DMA

Post by n_sethu »

Hi,

I tried the PCI scan. I got the following results. The port for
Command Register is 0x07 and Status Register is 0x00. Is it a valid value.
Is it that I have to program these ports???? (Im also a fresher in this project).
So help me out.

Thanx in advance.
Post Reply