by Guest »
Thanks again,
I want to ask a question about my implementation if it's fine. I have read the Altera PCIe IP Compiler documentation to understand how the translation table works. I have configured the IP Compiler to use dynamic address translation; In my device driver, I use dma_alloc_coherent function to get a memory region as DMA buffer, then I write dma_handle (bus address) of this region to the translation table of the device (I think I do this part correctly, so I skip the details). I initialize the memory in kernel, then send a signal to invoke the device, the device writes something to the TXS of PCIe IP Compiler using an Avalon MM Master interface. According to the docs, this write operation should be translated to a PCIe write packet. But after the handshakes are done, I don't see the right values in the memory. I see the same values I initialized in the kernel!
Please tell me if I'm missing something in this scenario. I have double-checked everything. I'm not an expert in device drivers. Maybe I have missed something there? Are there any necessary steps to grant DMA access, other than allocating the memory and sending the pointer over? That's my best guess.
Thanks
Thanks again,
I want to ask a question about my implementation if it's fine. I have read the Altera PCIe IP Compiler documentation to understand how the translation table works. I have configured the IP Compiler to use dynamic address translation; In my device driver, I use [b]dma_alloc_coherent[/b] function to get a memory region as DMA buffer, then I write dma_handle (bus address) of this region to the translation table of the device (I think I do this part correctly, so I skip the details). I initialize the memory in kernel, then send a signal to invoke the device, the device writes something to the TXS of PCIe IP Compiler using an Avalon MM Master interface. According to the docs, this write operation should be translated to a PCIe write packet. But after the handshakes are done, I don't see the right values in the memory. I see the same values I initialized in the kernel!
Please tell me if I'm missing something in this scenario. I have double-checked everything. I'm not an expert in device drivers. Maybe I have missed something there? Are there any necessary steps to grant DMA access, other than allocating the memory and sending the pointer over? That's my best guess.
Thanks