How to close pcie dma iommu but open the msi?

I am working on a PCIe driver for a custom Xilinx FPGA based end point device.
I want to close pcie dma iommu but open the msi?

By removing these 4 lines from the device tree node pcie@14160000:

#iommus = <&smmu_niso0 TEGRA_SID_NISO0_PCIE4>;
#iommu-map = <0x0 &smmu_niso0 TEGRA_SID_NISO0_PCIE4 0x1000>;
#dma-coherent;
#iommu-map-mask = <0x0>;

I can’t get msi interrupt from fpga.

By removing these 2 lines from the device tree node pcie@14160000:

#iommus = <&smmu_niso0 TEGRA_SID_NISO0_PCIE4>;
#dma-coherent;

I get msi interrupt from fpga.But get some error.And dma data is wrong .

err log:
[ 256.154511] arm-smmu 12000000.iommu: Unhandled context fault: fsr=0x80000402, iova=0x80200000, fsynr=0x6a0011, cbfrsynra=0x1013, cb=15
[ 256.167371] arm-smmu 12000000.iommu: Unhandled context fault: fsr=0x80000402, iova=0x80260000, fsynr=0x6a0011, cbfrsynra=0x1013, cb=15
[ 256.180189] arm-smmu 12000000.iommu: Unhandled context fault: fsr=0x80000402, iova=0x802c0000, fsynr=0x6a0011, cbfrsynra=0x1013, cb=15
[ 256.192875] arm-smmu 12000000.iommu: Unhandled context fault: fsr=0x402, iova=0x80320000, fsynr=0x6a0011, cbfrsynra=0x1013, cb=15
[ 256.204984] arm-smmu 12000000.iommu: Unhandled context fault: fsr=0x80000400, iova=0x80320000, fsynr=0x6a0011, cbfrsynra=0x1013, cb=15
[ 256.217540] arm-smmu 12000000.iommu: Unhandled context fault: fsr=0x80000402, iova=0x80434080, fsynr=0x6a0011, cbfrsynra=0x1013, cb=15
[ 256.230230] arm-smmu 12000000.iommu: Unhandled context fault: fsr=0x80000402, iova=0x80494000, fsynr=0x6a0011, cbfrsynra=0x1013, cb=15
[ 256.243046] arm-smmu 12000000.iommu: Unhandled context fault: fsr=0x80000402, iova=0x804f4000, fsynr=0x6a0011, cbfrsynra=0x1013, cb=15
[ 256.255816] arm-smmu 12000000.iommu: Unhandled context fault: fsr=0x80000402, iova=0x80554000, fsynr=0x6a0011, cbfrsynra=0x1013, cb=15
[ 256.268635] arm-smmu 12000000.iommu: Unhandled context fault: fsr=0x80000402, iova=0x80610000, fsynr=0x6a0011, cbfrsynra=0x1013, cb=15
[ 256.287465] mc-err: vpr base=0:0, size=0, ctrl=1, override:(201803c6, b9ee11c1, 1, 0)
[ 256.304575] mc-err: (255) csw_pcie4w: MC request violates VPR requirements
[ 256.318446] mc-err: status = 0x0ff740e1; hi_addr_reg = 0x00000000 addr = 0xffffffff00
[ 256.331212] mc-err: secure: yes, access-type: write
[ 256.352625] mc-err: vpr base=0:0, size=0, ctrl=1, override:(201803c6, b9ee11c1, 1, 0)
[ 256.367480] mc-err: (255) csw_pcie4w: MC request violates VPR requirements
[ 256.381349] mc-err: status = 0x0ff740e1; hi_addr_reg = 0x00000000 addr = 0xffffffff00
[ 256.394109] mc-err: secure: yes, access-type: write
[ 256.413299] mc-err: vpr base=0:0, size=0, ctrl=1, override:(201803c6, b9ee11c1, 1, 0)
[ 256.430408] mc-err: (255) csw_pcie4w: MC request violates VPR requirements
[ 256.444280] mc-err: status = 0x0ff740e1; hi_addr_reg = 0x00000000 addr = 0xffffffff00
[ 256.457046] mc-err: secure: yes, access-type: write
[ 256.476229] mc-err: vpr base=0:0, size=0, ctrl=1, override:(201803c6, b9ee11c1, 1, 0)
[ 256.493336] mc-err: (255) csw_pcie4w: MC request violates VPR requirements
[ 256.507290] mc-err: status = 0x0ff740e1; hi_addr_reg = 0x00000000 addr = 0xffffffff00
[ 256.520068] mc-err: secure: yes, access-type: write
[ 256.541408] mc-err: Too many MC errors; throttling prints

Q1:How to close pcie dma iommu but open the msi?

Q2: What is the mean of the err log?

[ 256.154511] arm-smmu 12000000.iommu: Unhandled context fault: fsr=0x80000402, iova=0x80200000, fsynr=0x6a0011, cbfrsynra=0x1013, cb=15

[ 256.287465] mc-err: vpr base=0:0, size=0, ctrl=1, override:(201803c6, b9ee11c1, 1, 0)
[ 256.304575] mc-err: (255) csw_pcie4w: MC request violates VPR requirements
[ 256.318446] mc-err: status = 0x0ff740e1; hi_addr_reg = 0x00000000 addr = 0xffffffff00
[ 256.331212] mc-err: secure: yes, access-type: write

Which jetpack version is in use?

Follow this post to disable SMMU…

Linux_for_Tegra/source/public/kernel_src/kernel/kernel-5.10/arch/arm64/defconfig 這裡是請你直接加上.

# CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT is not set

不是請你去找config_arm_smmu_disable_bypass_by_default=y…

是的…上面的post也有跟你講步驟

當然需要.

解决了,谢谢

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.