Bar4 is for atu_dma registers and bar0 is for dma buffer in xavier pcie ep mode. I can only find inbound_atu function in pcie-tegra-dw-ep.c, but it is used for inbound setting and not for bar setting.
Where is bar0 and bar4 mapping setting?
How can i bind bar2 with user-defined memory?
thanks~
Hi,
for your first question, those are fixed in hardware hence you may not find any specific programming.
for your second question, endpoint mode driver already takes care of mapping system memory to BAR-2. I think this can be exposed to userspace through mmap. Although this is not readily available in the code, I think this can be tried out at your end and I don’t see any reason why it won’t work.
I find that there is no bar mask register for bar2, but bar0 and bar4 have mask register.So I can not set bar2 size. I use function inbound_atu to set bar2 mapping, but I can not read the correct data in RC. How can I configure bar2? thanks