Hi,
If you go for b), it will be pretty straight-forward, but you won't get
colors/cursor control (because remcons doesn't support them). I think a)
should be possible, you just need to make sure the driver allows two
simultaneous opens and allows one client to block for reading and the other
to write, at the same time. Although this is slightly hackish, I think it's
currently the way to go - and you get the colors/cursor control. Also,
obviously you need to somehow let input/output servers know which device to
open (e.g. hardwire it). In the long term we'll need to redesign thins a
bit..
Cheers,
Jiri
---------- Původní zpráva ----------
Od: Jakub Jermar <[email protected]>
Datum: 28. 12. 2013
Předmět: [HelenOS-devel] Serial console in userspace Was: Re: [SOCIS 2013]
Port HelenOS to LEON3 - status report #15/#11 & serial console questions
"On 12/26/2013 09:49 PM, Jakub Klama wrote:
> I was investigating how to properly implement serial console
> in userspace. I see two possibilities here:
>
> a) adapt existing srv/hid/input and srv/hid/output to use
> UART character device node. Is it possible for two tasks
> to have opened char device simultaneously (one for reading
> only, other for writing only)?
Take a look at the SLIP server. Slip needs to be able to write to the
serial port while blocking in the read operation, and vice versa, so it
uses multiple fibrils to achieve this. There are some issues related to
this. For example, I had to allow multiple opens of the serial device
node in the ns8250 driver to support this, and because of:
#508 Parallel sessions don't mix well with call forwarding
I had to use two separate sessions.
> b) create something like 'srv/hid/sercons' based on remcons
> which will create console service and connect input and
> output to serial port.
During the HelenOS Camp, someone raised the question whether we need all
the remcons, sercons and possibly any other specialized *cons and if all
these tools could not be unified, just using different transports
(network and serial).
*Jiri*? *Maurizio*?
> Approach a) is much better in terms of code duplication, as
> srv/hid/output already implements things like terminal emulation
> and srv/hid/input keyboard layouts, etc. But is it possible?
I would like someone else to give his opinion on this. But note that
there is also the problem of selecting which serial port to use for the
user console. In this regard, your option b) seems more flexible.
Jakub
_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel"
_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel