I am developing a pci driver.
It tells the FPGA the address of the DMA memory and when the hardware generates an interrupt, the FPGA writes the data to the DMA memory.
However, when an interrupt appears, the following error occurs.
Are you doing DMA read or write? when the hardware generates an interrupt, the FPGA writes the data to the DMA memory.
Interrupt is generated from FPGA to Tegra, right? Does FPGA driver in Tegra initiates DMA here?
Can provide me link to datasheet which has DMA programming guidelines?
Is is possible to share FPGA driver source code?
Few pointers which will help you in debug,
arm smmu raised a fault with IOVA address 0x0 for write transaction.
So, FPGA initiated a memory write transaction towards Tegra PCIe.
There are two possibilities for this issue,
a) FPGA DMA engine has wrong DST address(0x0) for a DMA write transaction. Check your DMA programming sequence.
b) Linux PCIe driver in Tegra writes MSI address in FPGA’s MSI capability config register. FPGA initiates memory write to this address to raise PCIe MSI interrupt. If FPGA has bug and initiating memory write to 0x0 to raise MSI interrupt, then we can see arm smmu fault.
FPGA vendor provides a datasheet, it’ll have programming guidelines for DMA, like where to program source/destination address, size and how to initiate DMA(ring doorbell).
Based on the error signature, I think you are not programming destination address in BAR registers. So, DMA engine is doing write to invalid address 0x0. I believe you have to use one of the dma addresses allocated using dma_alloc_coherent() in your driver.