我正在 Linux 中编写一个需要实现的设备驱动程序DMA
。
很明显,DMA
可以通过调用来分配缓冲区pci_alloc_consistent()
。但是我们如何从用户级别向这些缓冲区写入命令呢?
任务包括将值写入特定寄存器,这些是如何使用DMA
命令实现的?
我正在 Linux 中编写一个需要实现的设备驱动程序DMA
。
很明显,DMA
可以通过调用来分配缓冲区pci_alloc_consistent()
。但是我们如何从用户级别向这些缓冲区写入命令呢?
任务包括将值写入特定寄存器,这些是如何使用DMA
命令实现的?
I believe you can write with DMA through I/O operations that you may access through a GNU C library . You must use system calls such as ioperm or iopl and run as root to gain access to DMA registers. At least thats how one gains access to IO space which may be used for DMA access. Though I may not answer the question completely, hopefully this points you in a good direction.