I’m developing a PCIe kernel module witch instantiate CMA buffer (with dma_alloc_coherent function).
During initialisation I put known value in the buffer.
In the User level I use the mmap function to get the virtual address of the buffer.
Address is given by dma_mmap_coherent using the correct kernel virtual and hardware address of the buffer.
The problem is that the virtual address given by mmap function doesn’t point to the expected memory buffer.
Does someone have any suggestion?
It seems that the problem is from SMMU as I saw in multiples topics but when I extract dts file from tegra186-quill-p3310-1000-c03-00-base.dtb there is no line containing:
I checked /sys/kernel/debug/12000000.iommu/master and find the line
Witch confirm that SMMU is enable.
So where can I disable it?
#stream-id-cells = <0x1>;" from the pcie-controller@10003000 node is already disable in the dts file extracted from /boot/tegra186-quill-p3310-1000-c03-00-base.dtb
so where can I find the actual method to disable SMMU?
I use L4T 28.2 with modification of the CMA size (CONFIG_CMA_SIZE_MBYTES parameter) set to 128.
allocation is done in the hardware starting range 0x80000000 but the virtual address given back to user level with mmap function doesn’t point to the good memory space.
How can I disable SMMU for my PCIe driver?