Re: understanding DMA in PCI drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bjorn,

[+ Kishon]

On 2018/2/7 22:39, Bjorn Helgaas wrote:

2. How does device triggers DMA from device to cpu, is it by simply
writing to BAR ?

In most cases the device itself performs the DMA.  It sounds like
you have a case where the DMA engine is not part of the device itself.
I don't know how that would be programmed, except to say that the DMA
engine presumably operates on DMA addresses, and something would still
have to DMA-map buffers to obtain those.

I have a question that why it's always device to performs the DMA for
no matter memory read and write? We have builtin DMA engine inside the
PCIe RC controller, so could the function driver submit the DMA request
to the PCIe RC controller driver and let it fire the DMA to access
device's internal memory? Given that we now support PCIe EP framework,
and now linux-pci behave like a *device* per your saying, so that is
quite possible for us to consider how we would submit DMA request with
current PCIe EP stuff.


BARs are typically used for programming the device, i.e., the driver
would use them.  BARs are not in the data path for a DMA transfer.

3. How does device triggers DMA from cpu to device, is it by simply
reading from BAR ?








[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux