1

我正在 Linux 中编写一个需要实现的设备驱动程序DMA

很明显,DMA可以通过调用来分配缓冲区pci_alloc_consistent()。但是我们如何从用户级别向这些缓冲区写入命令呢?

任务包括将值写入特定寄存器,这些是如何使用DMA命令实现的?

4

1 回答 1

1

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.

于 2012-03-28T07:07:17.610 回答