Sharing device driver between kernel and user space

geoffrey levand geoffrey.levand at mail.ru
Wed Sep 21 06:05:32 UTC 2011


I think you misunderstood what i need. If i got it right then cuse4bsd allows user applications to create char devices, right ?
I do not want to create character devices from user space. My VUART kernel
module should provide the character device for user space. What i need is a way to synchronize access
to VUART data between kernel and user space. The kernel device driver should provide 2 interfaces: one for user space
 (through char dev) and the other for kernel land. The problem is how to synchronize the access to VUART data between 2
lands because VUART cannot be shared by both simultaneously.

21 сентября 2011, 00:05 от Hans Petter Selasky <hselasky at c2i.net>:
> 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
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
> 


More information about the freebsd-hackers mailing list