Subject: Re: JavaStation update
To: None <port-sparc@netbsd.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: port-sparc
Date: 05/09/2002 03:22:39
On Wed, May 08, 2002 at 23:01:41 -0000, eeh@netbsd.org wrote:

> | > Where are the keycodes being decoded?  Where are the firmevents
> | > being generated?
> |
> | Upper layer has two callback methods for middle layers:
> | kbd_input_keysym() - for console input and kbd_input_event() for firm
> | events.  Serial layer just passes what it gets from (a real sun)
> | keyboard.  PS/2 layer converts PC keyboard scancodes into Sun keyboard
> | scancodes.  So upper layer always looks like a Sun keyboard.  That was
> | a design goal, since Xsun already knows about Type5 layout US101A
> | keyboard - a PC keyboard in Sun disguise.
> 
> So you're converting pc->Sun scancodes in the pckbd driver.  

No the "pckbd driver" (kbd at pckbd - actually, no connection to pckbc
driver) is the lower layer.  I do the conversion in the PS/2 middle
layer.  Well, since there's only one PS/2 kbd lower layer for the PS/2
kbd middle layer the point is mute, but logically it belongs to the
middle layer stuff.


> Is there some reason you didn't just attach to the sunkbd line
> discipline and feed the scancodes in as a serial stream?

Well, there's no such thing as a "serial stream" ;).  The existing
upper layer kbd driver already provides kbd_input_keysym and
kbd_input_raw upcalls.  The latter actually is mixture of serial
middle layer logic and upper layer kbd_input_event (in my refactored
driver) logic, so my refactoring splits it into two.

I've just moved serial-specific parts of kbd_input_raw into the serial
middle layer and firm event processing part into the upper layer.

SY, Uwe
-- 
uwe@ptc.spbu.ru                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen