Access a PCI device from user programs

I have a device that will communicate with my processor through pcie. I wrote a driver for this using existing pci file operations.

Now my problem is, how do I access it from user space programs? PCI file operations do not support IOCTL, and therefore I cannot make an ioctl call unlike other char devices. I can not use the functions pci_config_read_byte, etc., since they are intended for kernel space (included in linux / pci.h).

+3
source share
1 answer

I used uio for this. Then you can simply export the pci panel to user space. On x86, you can simply consider it as a region of volatile memory.

0
source

Source: https://habr.com/ru/post/1748990/


All Articles