Subject: new console driver code
To: None <current-users@NetBSD.ORG, port-i386@NetBSD.ORG>
From: Matthias Drochner <drochner@zelux6.zel.kfa-juelich.de>
List: port-i386
Date: 03/22/1998 21:43:04
There is a bunch of new files in the tree which belongs to
a new machine-independant console framework.
This is work in progress, for now it works only on i386
with VGA graphics.

There were some changes to config related files, so please
rerun "config".

If you don't want to play with it, there is one more change
which affects unsuspecting people:
The attribute "pckbd" in the kernel configuration files
- where PS/2 mice (pms) and that speaker device which
probably nobody uses (spkr) attach to - is now called
"pckbcport".
Either change your config files to use the new name or
use the real console device name.
Examples:
pms0 at pckbcport? irq 12
pms0 at pc? irq 12
pms0 at vt? irq 12


If you want to play with the new wscons code, some hints:

-There is only a US keymap for now. (This is easy to change,
  but not yet config- or runtime configurable. There are plans
  for a much improved map handling, so stay tuned.)
-The code is only tested on some newer Pentium boxes, not
  on strange or old hardware.
-There can be only one driver controlling graphics and the
  keyboard controller in the system. The existing console drivers
  don't employ the ressource allocation mechanism, so the
  config file must be written with care:
   -if "vga" is configured in, there can be no "pc" or "vt"
   -if "pckbc" is configured, "vt" is forbidden, and "pc" can only
    be used in conjunction with "pcconskbd"
-The keyboard beep doesn't work with wscons yet.
-There is no X support in the new console code.
-For a console usable for screen editing etc. you should define
options 	WSEMUL_SUN
 in the config file. The terminal type is then "sun".

Here are examples for possible configurations:
1. only new code
pckbc0	at isa?
pckbd*	at pckbc?
psm*		at pckbc?	# that's "psm", no typo
vga0	at isa?
vga*	at pci?
wsdisplay*	at vga? console ?
wskbd*          at      pckbd? console ?
wsmouse*        at      psm?

2. old pccons driver, new keyboard controller handling
  (should allow to run X, but not tested)
pckbc0	at isa?
pc0	at isa? port 0x60 irq 1
pcconskbd*	at pckbc?
pms*		at pckbc?

3. new code, but old mouse driver
  (don't know what's this good for - perhaps initial X development)
pckbc0	at isa?
pckbd*	at pckbc?
vga0	at isa?
vga*	at pci?
wsdisplay*	at vga? console ?
wskbd*          at      pckbd? console ?
pms*		at pckbc?

The new wsdisplay device has the major number 47. The minor
numbers are
(wsdisplay unit << 8) | virtual screen.
On PCs it is unlikely to have more than 1 display unit.
There can be 8 virtual screens for now, switching is done by
CTL-ALT-F1...F8, as in pcvt.


It would be nice to get some feedback how the code works
on different machines. It might be well possible that the keyboard
controller code is too naive about the bahaviour of the hardware
out there -- watch out for error messages starting with "pckbc".

Well, I shouldn't forget to mention that most of the code was
written by Chris G. Demetriou, and I did only some finetuning
for the PC platform.

best regards
Matthias Drochner