Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am new to linux device driver development and I'm trying to learn the
DMA transfer. Currently I have created a DMA buffer using pci_alloc_consistent() function. Since I don't have a real DMA enabled pci device, so I am thinking of transfer the data in the DMA buffer to some other buffer within kernel space(let say created through kmalloc) using DMA.
Is it possible to do DMA transfer within kernel space? If yes, please provide some sample code for the same.
And no, no software (not even the kernel) can do DMA transfer without DMA hardware.
Suggestion:
Read this article and see if it clears anything up for you: http://www.xml.com/ldd/chapter/book/ch13.html#t4
<= it sounds like you're already familiar with some/all of this
but I think it might be useful to (re)read anyway...
>> Yes, the kernel can do DMA.
That I know but is it possible to do it within RAM?
>>And no, no software (not even the kernel) can do DMA transfer without DMA hardware.
Is there anyway to check whether your hardware supports DMA, I am currently developing on standard x86 based machine.
I am new to linux device driver development and I'm trying to learn the
DMA transfer. Currently I have created a DMA buffer using pci_alloc_consistent() function. Since I don't have a real DMA enabled pci device, so I am thinking of transfer the data in the DMA buffer to some other buffer within kernel space(let say created through kmalloc) using DMA.
Is it possible to do DMA transfer within kernel space? If yes, please provide some sample code for the same.
Thanks in advance
Ravi Gupta
Hi,
I am also new in linux device driver world. I have the same issue and I would like to use DMA to copy from memory to memory. However, when I use APIs provided in dmaengine.h such as dma_request_channel or dma_find_channel with all combination of masks, the function returns NULL. On the other hand, when I use lower level APIs such as dma_request I can get a channel which implies that there are free channels in my system to use. Any suggestion?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.