EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Is DMA a part of PCIe protocol specification?

Started by sherlock88 6 years ago4 replieslatest reply 6 years ago4389 views

I was looking at PCI Express® Base Specification Revision 3.0 where I failed to find the details about DMA transaction support in PCIe protocol. Is it something that I can expect to appear in the specification document? If so, can anyone please point me out where to look at?

Several online source gives me the impression that PCIe is a DMA only bus. In other words, only DMA transfer is possible over PCIe bus where the peripheral acts as the bus-master. Also it makes me believe PCIe specification mandates the peripheral devices to have integrated DMA controller. To refer to a concrete example, the PCIe DMA section states that,

PCIe operates using a different paradigm. Instead of communicating with the host using a communication protocol, PCIe allows peripherals to gain Direct Memory Access(DMA) to the host’s memory. Using DMA, peripherals may autonomously prepare data structures within the host’s memory, only signalling the host (via a Message Signalled Interrupt) once there’s processing to be done. Operating in this manner allows the host to conserve computing resources, as opposed to protocols that require processing to transfer data between endpoints or to handle each individual request.

[ - ]
Reply by Tim WescottDecember 10, 2017

I didn't know the answer to your question, but I got interested enough to search: http://xillybus.com/tutorials/pci-express-tlp-pcie....  Search within the page for "DMA".

(And, it wasn't that hard of a search).

Bottom line (not just from that page): nearly everything on a PCIe bus is automagically a DMA master, except for main memory.  It may be that the specification just assumes that you know this, which would make looking for it confusing.

I suggest doing your own search, and reading up.  I remember trying to understand PCIe when it came out, and it was one of those things that's different enough from what you've done before that you have to work to get your head wrapped around it, after which it all makes perfect sense and your colleagues think you're crazy.  It may seem more normal to folks now, though.

[ - ]
Reply by techdcsDecember 10, 2017

DMA allows slower data storage peripherals to transact with main memory without the intervention of microprocessor .It is independent of any of the bus architectures like PCbus ISAbus EISAbus VESAbus or PCI and PCIe bus respectively.

[ - ]
Reply by sherlock88December 10, 2017

I have updated my original post which might give an additional context to my question. In short, though I understand DMA is a different concept independent of the bus protocol, some sources are trying to convince me that PCIe is a DMA only protocol.

[ - ]
Reply by techdcsDecember 10, 2017

Oh iam sorry i forgot to mention in my post yesterday that it was with respect to the PC architecture . All local bus architectures have a small amount of memory and devices working on interrupt based approach use DMA .The PCIe is used in interrupt based as well as non-interrupt based designs.

The 2024 Embedded Online Conference