The Uspace ocs_fc_ramd driver includes a small kernel module (ocs_uspace.ko). This kernel module provides access to PCI resources, as well as managing DMA memory buffers.
Kernel module functionality includes:
- Read/write PCI configuration space registers
- Read/write per PCI function BAR memory regions
- Mapping of per PCI function BAR memory regions to user space
- Allocation of and freeing of kernel resident DMA buffers, mapping buffers to user space
- DMA buffer synchronization (maintaining cache coherency)
- Wait on interrupt