Subject: NWSCONS design issue
To: None <tech-kern@netbsd.org>
From: Toru Nishimura <nisimura@is.aist-nara.ac.jp>
List: tech-kern
Date: 08/11/1998 19:36:25
Hi, I have been involved with NWSCONS for NetBSD/pmax.  I've encountered
with a trouble with multiheaded configuration.  My Q is; how can I
access to 2nd wsdisplay?

My development unit is Personal DECstation 5000/33 with one
TURBOchannel "smart framebuffer" option card.  Because it has a
baseboard framebuffer builtin, the TURBOchannel option card is probed
as 'wsdisplay1' like below;

...
xcfb0 at tc0 slot 2 offset 0x0: 1024 x 768, 8bpp
wsdisplay0 at xcfb0
sfb0 at tc0 slot 0 offset 0x0: 1280 x 1024, 8bpp
wsdisplay1 at sfb0: console (std, dumb emulation)
...

Now I want to do wsconsio.h ioctl's with 'wsdisplay1'  I looked at
sys/dev/wscons/wsdisplay.c and discovered questionable things in it.
Codes below make no sense to me;

#define WSDISPLAYUNIT(dev)      (minor(dev) >> 8)
#define WSDISPLAYSCREEN(dev)    (minor(dev) & 0xff)
#define WSDISPLAYMINOR(unit, screen)    (((unit) << 8) | (screen))

Those expect device minor number is longer than 8 bit, which are not
relevant with NetBSD.  Assuming this is an error, how can I open and
issue ioctls to the 2nd wsdisplay?

Tohru Nishimura
Information Technology Centre
Nara Institute of Science and Technology