[REVIEW] move tty lock/initial up in the stack

M. Warner Losh imp at bsdimp.com
Sun Jun 20 16:51:23 GMT 2004


In message: <82937.1087721102 at critter.freebsd.dk>
            "Poul-Henning Kamp" <phk at phk.freebsd.dk> writes:
: In an ideal world the hardware driver would be reduced to just that,
: a few simple primitives, "start", "config", "open", "close" and a
: backcall "rint" with received data and modem status changes.  This
: is not too unlike what Marcel have done with uart(4)

I guess I'm curious how the tty/cua split would be done in this
scheme.

Of course I'm reimplementing the Cyclades Z driver to try to use
uart, which is why I'm getting curious.  I don't know if this will
wind up working or not, but since 95% of the hardware interface is two
circular buffers in memory, which does seem to map mostly onto
Marcel's model.  Time will tell...  I also have porting the stallion
driver to current.  I can do this by a simple hack on the old driver,
or a rewrite.  I'll use my Z experience to decide.

: The major difference is that serial ports are rapidly headed into
: the sunset whereas disks are very much a hot topic.

I suspect that the decline will last for a long time.  Many of the usb
devices that I've seen are really usb to rs232 to thing, so I suspect
that it is a case of 'Serial ports are dead, long live the serial
ports'

: The pty driver is the only really interesting tty driver these days
: as most terminal access is through sshd, telnetd or xterm.

There's still a lot of people using ppp for dialup connections, even
in the day of broadband.  I suspect that will be the other large area
of heavy use.

: Currently I see two ways to get ptys out form under giant:
: 
: 1)	write an entirely new pty driver which is totally separate
: 	from the rest of the tty code (We don't need slip/ppp/netgraph
: 	support on ptys anyway).
: 
: 2)	clean up the tty code enough that the pty can be deGiantized,
: 	paving the road for the rest of the tty drivers to get the
: 	same treatment, should somebody else care enough.

Are you looking for help on the latter?

: I havn't quite made up my mind yet, and have resorted to some general
: polishing while I try to make sense of this stuff.  To some extent I
: already regret getting my fingers dirty over here.

OK.

Warner


More information about the freebsd-arch mailing list