Hi all,
on an NXP LS1046A (board LS1046ARDB) I want to use the qDMA to access (read only) the memory of a PCIe device (offered as memory bar) using qDMA.
OS: Linux kernel 4.14.16
For doing this I have written a tiny kernel module that does roughly the following steps:
dma_alloc_coherent(....); // To be used as the destination memory physaddr = 0x50400c0000; // This is the memory of the PCIe memory bar as seen by lspci
dma_map_resource(dev, physaddr, size, DMA_FROM_DEVICE, 0); dev->device_prep_dma_memcpy(chan, dst, src, size, 0);
This works fine for sizes up to 15 (!!) byte. E.g. 4 or 8 byte copies are fine.
However when I want to use a size of 16 byte or larger there will be a DMA transaction error.
The qDMA register DEDR shows 0x20000000 (Read transaction error).
I tried a different type of PCIe device. Here the effect is similar, however I am only able to copy up to 7 (!!) byte.
Using a size >= 8 the same error occurs.
Is there any idea on what the issue could be?
Any help is highly welcome.
Thank you very much!
Best regards
Mathias
Hi
I also have an requirement to use the qDMA to access the memory of a PCIe device on LS1046. can you please share the steps that you have followed? Do you have any sample application ??
The issue for the behaviour was the PCIe device in use. I switched over to a different device, a FPGA based PCIe board that allows block reading via PCIe memory bars. Now everything works as expected.