Sharing device driver between kernel and user space

Hans Petter Selasky hselasky at c2i.net
Tue Sep 20 20:05:14 UTC 2011


On Tuesday 20 September 2011 20:35:57 geoffrey levand wrote:
> Currently i'm developing VUART device drivers for PS3 architecture. VUART
> is bi-directional FIFO queue between 2 logical partitions on PS3. I want
> to use the device in the kernel and user space. During system boot PS3
> system has to read/write some data from/to the VUART devices and sometimes
> i want to access the device from user space , e.g. with character device
> driver by using read/write syscalls. The quuestion is what is the best
> solution to share the device between kernel and user lands. One solution i
> found would be to porohibit kernel access to the device as soon as a user
> application opens the corresponding character device. And allow it again
> when the application calls close syscall. The user space should have
> higher priority then the kernel. Are there any better solutions for this
> problem ? Forgot to mention that a VUART device cannot be accessed
> simultaneously by user land and the kernel. The VUART devices are used by
> PS3 management logical partition to provide different request/response
> services and event notification to other logical partitions. E.g. setting
> video mode or configuring audio outputs.
> 

Have you looked at cuse4bsd in ports/multimedia/cuse4bsd-kmod ?

--HPS


More information about the freebsd-hackers mailing list