Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Sep 2011 10:05:25 +0400
From:      =?UTF-8?B?Z2VvZmZyZXkgbGV2YW5k?= <geoffrey.levand@mail.ru>
To:        =?UTF-8?B?SGFucyBQZXR0ZXIgU2VsYXNreQ==?= <hselasky@c2i.net>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re[2]: Sharing device driver between kernel and user space
Message-ID:  <E1R6Fvx-0005sO-00.geoffrey-levand-mail-ru@f177.mail.ru>
In-Reply-To: <201109202202.19481.hselasky@c2i.net>
References:  <E1R65Aj-0003Fj-00.geoffrey-levand-mail-ru@f57.mail.ru> <201109202202.19481.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help

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@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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
> 

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1R6Fvx-0005sO-00.geoffrey-levand-mail-ru>