Can the physical address returned by using dma alloc coherent be used as a pcie transport address?

func discreption: The Fpga uses the pcie interface to actively write DMA data to the arm cpu.

ARM Linux reported a memory controller error while writing data. This error was last located because the iova address did not match the dma memory address that arm linux actually applied for.

The destination address of Fpga dma is a physical address obtained by the dma_alloc_coherent function.
The physical address is different from iova=0xc001000 in the error log, and there is an offset.

Try to modify the fpga dma address, can piece together and iova equivalent situation, this time the data sent by the fpga can be normally written to the ARM memory.

The preceding error occurs in the following two memory application modes.

  1. Can the physical address returned by using dma_alloc_coherent be used as a pcie transport address?
  2. If the address returned by dma_alloc_coherent cannot be used as a pcie address, how to obtain the memory iova address?
    linux内存iova地址获取.docx (49.1 KB)

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.

Sorry for the late response, have you managed to get issue resolved or still need the support? Thanks