Hello All,
I have been reading the "Linux Device Drivers" book 3rd edition but I'm not sure how to put it all together. I am writing a PCI device driver for a PCI board that is capable of DMA and generating interrupts. Here are my questions:
2. Is there a mechanism for a user-space process to control/access a PCI driver like the "ioctl" call for a char driver?
Then I assume that I need to call a function something like "move_to_user()" to pass the data to user-space for processing. Is there a way to DMA directly to user-space without double buffering?
4. How can I alert a user-space process when there is new data available from the PCI board? I was looking at the "top half" and "bottom half" sections in the driver book and contemplating using a "bottom half" process to move the data to user-space but I don't know how to alert a user-space process it has new data in its buffer to process. What about synchronization? Could the function "wait_event_interruptable()" play a role here?
5. Has anyone done this before? Is there example driver source code that I might have overlooked?
|