Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: replace a legacy proprietary RTOS (Real-Time executive) with NetBSD!


Thanks again for your quick reply.

Regarding fielding the interrupts in user space, my question was
whether it is possible to write user mode device drivers. In the case
of user-mode drivers, the interrupts need to be handled at the user
space level. Also device address space need to be mapped into the user
space to control/configure the device.

Thanks in advance,

On Mon, Jan 12, 2009 at 5:00 PM, Mindaugas Rasiukevicius
<rmind%netbsd.org@localhost> wrote:
> "Thirupathiah Annapureddy" <writetothiru%gmail.com@localhost> wrote:
>> Few other specific questions:
>> - Is there a message queue/mailbox mechanism inside the kernel for
>> communication between two kernel tasks? or do we need to go for a
>> custom implementation.
> Depending what kind of message queue mechanism you mean exactly. There
> is no generic mechanism, like in DragonFlyBSD. However, it is very easy
> achievable by using mutex(9) + condvar(9) + queue(9).
> One can have a look at POSIX message queue implementation:
> http://nxr.netbsd.org/source/xref/sys/kern/sys_mqueue.c
> While it is an interface for user-space, it would be pretty much the same
> concept in a case of kernel interface (code could be just re-used).
> There is a generic cross-call facility, however it is designed for more
> specific use:
> http://nxr.netbsd.org/source/xref/sys/kern/subr_xcall.c
> No xcall(9) man page yet, but interface is very simple.
>> - is there a semaphore implementation for usage from kernel space? I
>> could see mutex(9), but not semaphore.
> No. Addition of the kernel semaphore was considered about a year ago,
> but it seemed there was no use for in today's kernel.
>> - is there a kernel space timer APIs to handle addition of a soft
>> timer, deletion, modification etc functions.
> There is callout(9) interface. There is a 3rd party patch to support
> high-resolution timers (with the support for ARM platform):
> http://mail-index.netbsd.org/tech-kern/2008/06/25/msg001847.html
> http://mail-index.netbsd.org/tech-kern/2008/09/15/msg002727.html
> However, it is not yet integrated, as the goal is to make them based on
> the same callout(9) interface.
>> - can the interrupts be field in the user-space in case we decide to
>> port some of the device/IO access code to the user space to minimize
>> the porting changes?
> Not sure what do you mean here, sorry. But well.. there is no standard
> way to control the interrupts from user-space.
>> Thanks in advance,
>> Thiru
> --
> Best regards,
> Mindaugas

Home | Main Index | Thread Index | Old Index