Re: DMA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



jhoney jhoney wrote:
Hello All,

Presently I am working on DMA, I have to DMA the data from PCI HOST to PCI AGENT. I am searching for the template code for allocating dma buffer and receiving the data. I thought of following a network device which uses the DMA the packet to kernel memory and receives an interrupt.
Could u please tell me the exact code for allocating the space for DMA and calling the appropriate functions handling the whole dma process in 2.4.27 kernel for network devices

Thanks in Advance

Jhoney
Hi,
Buffers DMA have to be on a special memory pool which is init at boot time.
you can then allocate DMA buffers with the normal memory functions (get_page or kmalloc) and with a special flag: __GFP_DMA
kmalloc(size,__GFP_DMA) ;
__get_fre_pages(__GFP_DMA,order) ;



-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux