Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Looking for help on DMA: (7 Items)
   
Looking for help on DMA  
Hello,

I am interested in examples on how to use the DMA controller. My goal is to send data over to board that sits on a PCIe 
slot without keeping my CPU busy doing this data transfer; rather, having a DMA doing that for me. I am using x86 with 
Intel I/O Controller Hub 7 (ICH7) which has numerous DMA registers. There must be a standard way to work with the DMA 
controller (maybe through a driver) instead of learning and programming each one of the registers (after all, DMA is 
common hardware and many developers are using it). I’ll be happy to get any information on this topic. I tried looking 
in the QNX source code for the network driver, but there is too much stuff going on there, and extracting out the DMA 
essentials was a bit difficult.

Thanks in advance,

-Didi Freiman.
Re: Looking for help on DMA  
Not sure if there is a general approach - isn't the way DMA is programmed specific to the corresponding PCI/PCI Express 
card you're using?
Re: Looking for help on DMA  
> Not sure if there is a general approach - isn't the way DMA is programmed 
> specific to the corresponding PCI/PCI Express card you're using?


Yes usually DMA is use by a device to PUSH data in to the main memory.   Hence it's device specify since the DMA engine 
sits on the device.

I don't know about the Intel I/O Controller Hub 7 (ICH7)  but I'm guessing these DMA register are attached to one of 
it's devices ( USB, HD, Network etc).

I think it would have to be the board that you are using that needs to be setup to read memory.

It's my understand that it would be very difficult to do it otherwise.  Say you're PC has 5 dma engine then what if you 
want to use 6 devices, you'd be in trouble ;-)

In the ISA world it used to be like that ;-)
Re: Looking for help on DMA  
> > Not sure if there is a general approach - isn't the way DMA is programmed 
> > specific to the corresponding PCI/PCI Express card you're using?
> 
> 
> Yes usually DMA is use by a device to PUSH data in to the main memory.   

And to PULL as well,
Re: Looking for help on DMA  
I am also looking for a solution for the usage of DMA transfers.
Did you find a way to manage it sinc your last post ?
RE: Looking for help on DMA  
What do you mean by solution. DMA is always devices specific.

> -----Original Message-----
> From: M. Leippert [mailto:community-noreply@qnx.com]
> Sent: October 9, 2009 12:54 PM
> To: general-community
> Subject: Re: Looking for help on DMA
> 
> I am also looking for a solution for the usage of DMA transfers.
> Did you find a way to manage it sinc your last post ?
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post39687
> 
Re: RE: Looking for help on DMA  
Sure it is device specific. Didi Freiman asked for DMA programming of the Intel ICH7. And my question is if he, or 
somebody else, managed to do DMA with this chipset.

I have a board with ICH8 chipset and I suppose that it would be quite the same as with ICH7. I think that INTEL usees 
the same DMA controller functionality in all of their chipsets 

Here a excerpt of the ICH8 data sheet :
----------------------
The ICH8 supports LPC DMA using the ICH8’s DMA controller. The DMA controller has
registers that are fixed in the lower 64 KB of I/O space. The DMA controller is
configured using registers in the PCI configuration space. These registers allow
configuration of the channels for use by LPC DMA.
The DMA circuitry incorporates the functionality of two 82C37 DMA controllers with
seven independently programmable channels ........
----------------------

So I think it should be possible to have a lib for DMA with the Intel chipsets - and this is what I am looking for, 
before I re-invent the wheel :)

My application is to have DMA transfer from the memory of the CPU board to a PCI card. This to save CPU-time - in the 
moment I do it in a "for-loop", and it takes about 40 percent of the CPU time.






> What do you mean by solution. DMA is always devices specific.
> 
> > -----Original Message-----
> > From: M. Leippert [mailto:community-noreply@qnx.com]
> > Sent: October 9, 2009 12:54 PM
> > To: general-community
> > Subject: Re: Looking for help on DMA
> > 
> > I am also looking for a solution for the usage of DMA transfers.
> > Did you find a way to manage it sinc your last post ?
> > 
> > 
> > 
> > _______________________________________________
> > 
> > General
> > http://community.qnx.com/sf/go/post39687
> >