PCIe bulk transaction without DMA

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

PCIe bulk transaction without DMA

2,468 次查看
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

标签 (1)
标记 (3)
4 回复数

1,137 次查看
SaLaManDer99
Contributor I

so will this method work for write? and is it working for read?

0 项奖励
回复

2,075 次查看
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.

2,075 次查看
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 项奖励
回复

2,075 次查看
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 项奖励
回复