Data transfer from EP using EP DMA

Hi,
I’m having two Jetson Xavier boards, one is RC and another is for EP.

I’m trying initiate data transfer from EP to RC. It works fine without DMA. But when i try to transfer the data using DMA, it is not working.
Below are the steps i followed for DMA,

For the source address: I have reserved 256MB of data starting from location 0x470000000. In the driver i have ioremapped it.
Since i cannot use virtual address for DMA , i have used dma_map_single() (for 0x96000 bytes) to get the dma address and this is used as source address.

For the destination address: Similar like without DMA method, I have used pci_epc_mem_alloc_addr() and pci_epc_map_addr(). But with one change i.e here i have used the phys_addr(passed as arg to pci_epc_map_addr()) as destination address.

Am i doing anything wrong? why is it not working in DMA ?

Based on the description, I believe you are trying to do DMA write with source being the EP system’s local memory and destination being the RP system’s local memory and the errors are observed in the RP system. Is that a correct understanding?
If so, I think the issue is that the destination should be a DMA’able address and in this case, the physical address is given directly. Since SMMU is enabled for the controller, it throws errors when a non DMA’able address access takes place from the PCIe IP.