Subject: Re: mi PC keyboard / PS/2 mouse driver
To: Chris G. Demetriou <cgd@pa.dec.com>
From: Matthias Drochner <drochner@zelux6.zel.kfa-juelich.de>
List: tech-kern
Date: 02/20/1998 18:57:03
Excerpts from netbsd: 19-Feb-98 Re: mi PC keyboard / PS/2 m.. "Chris G.
Demetriou"@pa. (1208)

> Maybe if you can do that on the i386, and demonstrate that it really
> isn't too hard to glue the new keyboard code into an existing pccons
> driver it'd be worth looking into

OK, I've just built a "demo" - the lowlevel driver connected to
the i386 pccons and pms.
You can have a look at it at:
zelof1.zel.kfa-juelich.de:/pub/NetBSD/pckbc-980220.tar.gz

> but it's silly and annoying to have
> to do a bunch of the same work 2x

The main part of the work and the advantage from the technical
point of view is the unified handling of the keyboard controller
in pckbc.c. (You might find it horribly overdesigned. It's quite
a lot of code for 2 8-bit ports -- that's what one gets if he uses
badly designed hardware.) I had done this before for your
wscons code to look a bit nicer before I've given it to Juergen.
The remainder is glue code, not really a challenge.

> (or once, if something else --
> e.g. updating to the new console code -- is going to 'automatically'
> do it for you later)

The problem is that the wscons code doesn't plug in nicely,
as it looks now. There are namespace collisions and differences
in the autoconfiguration structure. It would need a hero to
complete it for all affected architectures and throw it in at once.
And nobody has the hardware to test a piece of code which
is critical (as the keyboard controller) on all platforms.
That's why I think we need coexistence for a while and should
try to work out the conflicts to make it possible.
There are of course other ways to allow coexistence - simply
rename everything which is in the way. But then one would have
restrictions like "you can't use the old mouse driver with the
new keyboard driver" or so.

best regards
Matthias