PCIe bulk transaction without DMA

cancel
Showing results for 
Search instead for 
Did you mean: 

PCIe bulk transaction without DMA

573 Views
rainerboschung
Contributor II

Question regarding initiate burst PCI Express transaction from Host CPU (T1040).

As far as I understand CPU access to PCI memory will end-up in a 32bit PCIE transfer requests, and for transactions making use of the max payload size of 256B one has to use DMA.

Since the device I have to read from does not support DMA I would like to know whether it is possible to create a single read transaction making use of the full payload size of 256B without using DMA.

Regards

Rainer

Labels (1)
Tags (3)
3 Replies

180 Views
lwn
Contributor II

well, you could just use your CPU's DMA engine to do a mem2mem transfer that copies a block of memory between the pcie device BAR0 and system memory. This way your pcie device doesn't need to support DMA by itself.

180 Views
rainerboschung
Contributor II

Thanks for your answer! Sounds promising.

Does this also work for other than BAR0?

Could you point me to some example code?

0 Kudos

180 Views
lwn
Contributor II

the pcie registers you want to DMA need to be "memory mapped", so any mapped BAR will do

example code depends on your OS -> google it, you are certainly not the first one to do that

0 Kudos