How DMA works in ARM? The DMA stopped working with our PCI driver

We have a PCI driver for our multiple devices. It worked for years in x86 and PPC in Linux 32-bit and 64-bit. But the driver did not work in the Jetson_TX1 ARM platform (first time we are trying to support ARM). After the DMA was programmed, an error showned in dmesg as
smmu_dump_pagetable(): fault_address=0x0000000083403000 pa=0xffffffffffffffff bytes=ffffffffffffffff #pte=0 in L2
during the excusion of the DMA transaction.

By reading the forum “What is the current status of PCIe DMA?”,
https://devtalk.nvidia.com/default/topic/988351/jetson-tx1/what-is-the-current-status-of-pcie-dma-/#
I think we have the same issue. We probably need to disable IOMMU, so we can set the 32-bit physical address to the DMA register (32-bit only register). But how to do it? Is there any detailed step-by-step information to do it?

If my understanding is not correct, what is the right solution? please advice.

You are probably correct, but an exact answer (which I can’t give) will depend on which L4T version you are using. I think in the earlier releases with only 32-bit support things worked with some backwards compatibility, but later on in the 64-bit future the way the memory I/O worked shifted from whether addresses corresponded to physical address to not corresponding to physical address…and an update would be required for anything assuming there was no address shift. Likely determining DMA address is wrong due to leaving out that translation of address.

my system information is
Linux tegra-ubuntu 3.10.96-tegra #1 SMP PREEMPT Wed Sep 28 17:51:08 PDT 2016 aarch64 aarch64 aarch64 GNU/Linux

If my system needs to update, can you please tell me the detailed steps?

I don’t know if flashing the system will fix anything…if it is a driver in need of changes it depends on whether the driver is updated. It is worth trying though, the most recent L4T version for a TX1 is R28.1. See:
https://developer.nvidia.com/embedded/linux-tegra

Disabling SMMU might do what you need. I am thinking about an issue where there was a change between whether PCIe DMA was physical address at one time, and then changed with SMMU such that some drivers were still mistakenly using physical address when what they really needed was a virtual address. Someone from NVIDIA will need to comment on how to test if this is the issue.

I am new in using the TX1 machine. Can someone tell me the detailed steps to

  1. upgrade TX1 to R28.1.
  2. disable SMMU
    I will try both.

I posted the two questions in forum as two new items so this one can be closed.
Thanks for the help.