Subject: Wscons question
To: None <tech-kern@netbsd.org>
From: Blaz Antonic <blaz.antonic@siol.net>
List: port-pmax
Date: 02/08/2004 23:45:46
Hello,

I apologize for cross-posting but i can't seem to be able to get an
answer on "domestic" (port-vax) list, apparently no living soul that
still reads that list ever got DEC keyboard to work with any Vaxstation.
I'm not subscribed to either of these two lists so please CC all replies
to me :)

I have problems getting wscons (keyboard) part working on
Vaxstation-class machine with a new fb driver i wrote. Display part of
the driver - my code - seems to work pretty much as expected (i can
"echo text > /dev/ttyw0" and it shows up on screen) but the keyboard
part - the generic dec dz keyboard support for wscons that is already in
the kernel - doesn't seem to be working all that well. I altered
arch/vax/vax/conf.c to set *cngetc and friends and call cons_decl() and
all just like another (allegedly working) console driver for Vaxstation
3100 does.

Kernel config options as set correctly, dzkbd is compiled in, dmesg
shows this:

...
dz0
wskbd0 at lkkbd0 (mux ignored)
lkms0 at dz0
wsmouse0 at lkms0 (mux ignored)
lcg0 at vsbus0 csr 0x21801000 vec 440 ipl 15 maskbit 2
wsdisplay0 at lcg0 (kbdmux ignored)
wsdisplay0: screen 0-7 added (160x68, vt100 emulation)
...

Keyboard is obviously functioning since it and dz code looks for it on
the right port since i can overflow input buffer (?) by holding down 10
or more keys at the same time:

...
lk201_decode: down(212) no free slot
lk201_decode: down(214) no free slot
lk201_decode: down(195) no free slot
lk201_decode: down(220) no free slot
lk201_decode: down(174) no free slot
lk201_decode: down(209) no free slot         
...

Now, if dzkbd is working (and keybaord is connected properly, why
doesn't wskbd_cngetc() ever get called ? I added printf()s there to make
sure it gets called and i see no feedback from there. Can any of the
PMAX folks please confirm that wskbd_getc gets called when a key is
(de)pressed ?

I hope my undersatnding of wscons is corerct, it is extremely vaguely
doccumented and each implementation of a console code similar in
function to mine seems to do something differently.

Also, i get these messages at bootup, Google didn't provide any
meaningful answer so i was wondering if anybody knows what these mean:

ttyflags: TIOCSFLAGS on /dev/ttyw0: Device not configured
...
etc. for all 8 of them

Related question: what facilities does my code have to provide to wscons
(which ioctls and other calls) in order to have generic wscons X server
work on top of it ? Only the GINFO ioctl and the *mmap() function ? What
should *mmap() be doing anyway, it is only a couple of lines of code,
can somebody please clarify it ? Where do palette changes come in ?

Blaz Antonic