Subject: Re: XalphaNetBSD multihead ?
To: None <>
From: Roland Dowdeswell <>
List: port-alpha
Date: 05/03/2002 14:26:04
On 1020405953 seconds since the Beginning of the UNIX epoch wrote:

>Now the documentation for XalphaNetBSD seems to be hard to find (for me, at
>least) but I guess what I'm looking for would be the -dev : switch ?

Yes, this isn't well documented and in fact does not work `right out
of the box'.  But I've set it up with 2 or 3 TGA cards pretty easily
in the past.  My alphas are currently still off and in boxes since I
just moved but I attach a quick pseudo-code patch which will give the
idea of what the mysterious patch was.

>Anyway, my problem is that I've got no idea how to map wsdisplay1 into
>/dev/ttyF0 (?) if I need /dev/ttyFcfg.

You need /dev/ttyF0 and /dev/ttyFcfg.  I'm not sure if this is the
appropriate naming convention, but it is the one that I used too.

crw-------  1 root  wheel  25, 256 Jan  6 00:31 /dev/ttyF0
crw-------  1 root  wheel  25, 511 Dec  5 21:19 /dev/ttyFcfg

shows the numbers that they must be.

After this you must put a screen on the one that isn't the console
(or more than one if you have 'em.)

	# wsconscfg -f /dev/ttyFcfg 0

At this point, you can test it by simply doing ``echo wow > /dev/ttyF0''
and noting if ``wow'' appears on that screen.

There is a small kernel patch which looks something like this:

Index: wsdisplay.c
RCS file: /cvsroot/syssrc/sys/dev/wscons/wsdisplay.c,v
retrieving revision 1.62
diff -u -r1.62 wsdisplay.c
--- wsdisplay.c	2002/03/17 19:41:05	1.62
+++ wsdisplay.c	2002/05/03 18:06:26
@@ -932,11 +932,11 @@
 	inp = sc->sc_input;
-	if (inp == NULL)
-		return (ENXIO);
-	error = wsevsrc_display_ioctl(inp, cmd, data, flag, p);
-	if (error != EPASSTHROUGH)
-		return (error);
+	if (inp != NULL) {
+		error = wsevsrc_display_ioctl(inp, cmd, data, flag, p);
+		if (error != EPASSTHROUGH)
+			return (error);
+	}
 #endif /* NWSKBD > 0 */
 	switch (cmd) {

Please keep in mind that I just regenerated that off the top of my
head and so I cannot guarantee that it is strictly speaking correct,
or even that it compiles.  It is just pseudo-code for what I think
that I remember doing.

The basic idea of the patch is that in the current system any ioctl
to a wsdisplay which does not have an attached mux fails.  I think
that this is not necessarily the best idea, since if I have a few
additional screens there is a large chance that I will not be
attaching additional displays to them.  But if I can't ioctl them,
then I cannot set the colourmaps or probe the screen size, etc,
etc from X.

At this point you call XalphaNetBSD with -dev /dev/ttyF0:/dev/ttyE0,
or -dev /dev/ttyE0:/dev/ttyF0.  I think that is the right order
for them, the only strict requirement seems to be that the wsdisplay
which has the keyboard and mouse must be the first one in the list.
IIRC, the kernel attaches the keyboard and mouse to the last one
that is matched which in the two card case is /dev/ttyF0.

I'm going to be setting up my XP1000 to use zaphodded X soon, so
I'll cross reference my instructions here and try to expand upon
them a little bit.

I also attach the message that I sent when I first got this working
since it has some additional information.

 == Roland Dowdeswell                      http://www.Imrryr.ORG/~elric/  ==
 == The Unofficial NetBSD Web Pages        http://www.Imrryr.ORG/NetBSD/  ==
 == The NetBSD Project                            http://www.NetBSD.ORG/  ==
#forw [forwarded message] +/u/elric/usr/mail/NetBSD/port-alpha 7502