termios/PTY problem

Eric Norum eric.norum at usask.ca
Tue Sep 10 15:13:33 UTC 2002


On Tuesday, September 10, 2002, at 01:28 AM, Thomas Doerfler wrote:

> Hi Till,
>
> I think you are right, currently there is no
> support in termios for line conditions like
> hangup, ring etc. And it would be good to have
> that support in termios.
>
> Some time back Eric Norum memntioned, that he
> intends to port the FreeBSD termios system to
> RTEMS, I guess this would contain a signalling
> mechanism aswell, but I don't know how far he got
> that way.

I had a hacked-together version running a few months ago, but I've not 
been able to keep up to the changes in the RTEMS source layout.  Once I 
have a stable base I'll give the port another try.
Problem areas I found in porting the latest FreeBSD termios/network 
stack:
1) The FreeBSD code assumes that memory is allocated on a 
2^(ceil(log2(n)) byte boundary.  The mbuf, mbuf cluster, and clist code 
depend on this.  The existing RTEMS port has some hacks to fake these 
semantics for mbufs and mbuf clusters, but I've not figured out an 
efficient way of dealing with clists (128-byte allocations, required to 
be on 128-byte boundary).
2) Where should termios signals be directed?  RTEMS has no notion of 
'controlling TTY'.  My hacked-together version just drops termios 
signals in the bit bucket!
3) I'd like to modify network drivers to support probing so that 
selection of NIC can be done at run-time.

>
> Any changes/additions to termios should (IMHO) be
> made in a compatible way, so that existing
> drivers based on termios need not be modified.
>
>

I think tht this is impossible if the FreeBSD termios code is to be 
reused.  All serial line drivers required extensive modification since 
they are now more similar to the network drivers -- task-based, etc.  
There's no longer an option for polled serial I/O as things now stand.

I'd like some feedback on this.  If there's interest, I'll try to bring 
the termios changes up to date.  The changes are substantial enough 
(IMHO) to warrant a 5.0 release of RTEMS.

-- 
Eric Norum <eric.norum at usask.ca>
Department of Electrical Engineering
University of Saskatchewan
Saskatoon, Canada.
Phone: (306) 966-5394   FAX:   (306) 966-5407




More information about the users mailing list