Dma driver linux
A device driver using DMA has to talk to hardware connected to the interface bus, which uses physical addresses, whereas program code uses virtual addresses. As a matter of fact, the situation is slightly more complicated than that. DMA-based hardware uses bus, rather than physical, addresses. Linux DMA Engine A driver, dmaengine.c, along with Xilinx DMA drivers, is located in drivers/dma of the kernel Documentation about this seems to be limited –In kernel: Documentation/www.doorway.ru –No other good information on the web The Xilinx kernel has the DMA engine driver turned on by default. int dad_dma_prepare(int channel, int mode, unsigned int buf, unsigned int count) { unsigned long flags; flags = claim_dma_lock(); disable_dma(channel); clear_dma_ff(channel); set_dma_mode(channel, mode); set_dma_addr(channel, virt_to_bus(buf)); set_dma_count(channel, count); enable_dma(channel); release_dma_lock(flags); return 0; }.
In the release version of Linux, the AXI DMA test driver kernel panics when the driver is compiled as a built-in module (When the setting CONFIG_XILINX_DMATEST=y in kernel configs). prepare the descriptor (dmaengine_prep_*) use dmaengine_desc_get_metadata_ptr () to get the pointer to the engine’s metadata area. update the metadata at the pointer. use dmaengine_desc_set_metadata_len () to tell the DMA engine the amount of data the client has placed into the metadata buffer. submit the transfer. A device driver using DMA has to talk to hardware connected to the interface bus, which uses physical addresses, whereas program code uses virtual addresses. As a matter of fact, the situation is slightly more complicated than that. DMA-based hardware uses bus, rather than physical, addresses. Although ISA and PCI addresses are simply physical addresses on the PC, this is not true for every platform.
* Based on the Freescale DMA driver. *. * Description: * The AXI Video Direct Memory Access (AXI VDMA). When an NVIDIA GPU has an addressing limit less than the maximum possible physical system memory address, the NVIDIA Linux driver will use the __GFP_DMA May 1, DMA stands for direct memory access and refers to the ability of devices or other entities in a computing system to modify main memory.
0コメント