你好,我使用的两个imx8qm芯片,一个作为pcie host,一个作为pcie endpoint,它们通过pcie连接,我的目的是要endpoint访问host的内存,因此需要配置host的inbound和endpoint的outbound。linux版本是6.6.3。跟踪了下代码,pcie host默认情况下是不会调用dw_pcie_prog_inbound_atu函数的,需要在设备树的pciea节点里配置一个dma-ranges属性,但是我不知道该如何配置它的值,能否给个示例?以及对应的endpoint端
static int dw_pcie_ep_outbound_atu(struct dw_pcie_ep *ep, u8 func_no,
phys_addr_t phys_addr,
u64 pci_addr, size_t size)
函数的参数该如何填写,非常感谢!
Hi,
Thank you for your interest in NXP Semiconductor products,
You could follow standard Linux PCI test (https://www.kernel.org/doc/html/latest/PCI/endpoint/pci-test-howto.html) then try setting '-d' to enable DMA on the ./pcitest command in the pci.sh script.
Regards
谢谢回复,这个文档我看了,pci-epf-test和pci_endpoint_test理论上是可以测试host和endpoint之间的互相访问,但是在im8qm + nxp 6.6.3 linux的环境下,host端的驱动中,我进行了调试跟踪,dw_pcie_iatu_setup函数里调用了dw_pcie_prog_outbound_atu函数进行outbound的配置,但是dw_pcie_prog_inbound_atu函数没有被调用,即没有配置inbound,看了下代码,是需要确保设备树的pcie节点里有dma-ranges属性才会调用dw_pcie_prog_inbound_atu函数,但是我在6.6.3里搜索了imx8qm的所有dts/dtsi文件,没有找到哪个dts/dtsi文件的pcie节点里配置有dma-ranges,这是怎么回事呢?