Subject: Re: X server for sparc
To: Theo de Raadt <deraadt@fsa.ca>
From: Dennis Ferguson <dennis@ans.net>
List: port-sparc
Date: 07/21/1994 11:03:51
> If someone would deal with this for a while, I am willing to make a
> few source tree changes to ease the porting of X. I know it isn't easy
> at the moment -- lots of needed stuff isn't available in
> /usr/include/machine.

I can tell you what would have made compiling a non-working server
easier, though I'll need to play a bit more to get past my current
impasse and discover what a working server might need.

A few #include files from arch/sparc/{dev,sbus} need to be copied somewhere
easier to get at.  Absolutely required are

	dev/kbio.h
	dev/kbd.h
	dev/vuid_event.h

Possibly required (they are needed only for a very few constants which
are now hardcoded into the server) are

	sbus/btreg.h
	sbus/bwtworeg.h
	sbus/cgthreereg.h
	sbus/cgsixreg.h

I copied them into /usr/include/dev, though anywhere would be fine.

It would make life easier if the following defines were made in vuid_event.h
and kbio.h (assuming they don't conflict with anything in the kernel):

*** 1.1	1994/07/21 14:12:42
--- vuid_event.h	1994/07/21 14:14:40
***************
*** 66,71 ****
--- 66,73 ----
  #define	MS_RIGHT	0x7f22	/* right mouse button */
  #define	LOC_X_DELTA	0x7f80	/* mouse delta-X */
  #define	LOC_Y_DELTA	0x7f81	/* mouse delta-Y */
+ #define	LOC_X_ABSOLUTE	0x7f82	/* X compat, unsupported */
+ #define	LOC_Y_ABSOLUTE	0x7f83	/* X compat, unsupported */
  
  /*
   * Special `value' fields.  These apply to keys and mouse buttons.  The

*** 1.1	1994/07/21 14:08:11
--- kbio.h	1994/07/21 14:11:49
***************
*** 85,88 ****
--- 85,91 ----
  #define	KIOCSDIRECT	_IOW('k', 10, int)	/* keys to console? */
  #define	KIOCLAYOUT	_IOR('k', 20, int)	/* get keyboard layout */
  
+ #define	TR_NONE			0	/* X compat, unsupported */
+ #define	TR_ASCII		1	/* X compat, unsupported */
+ #define	TR_EVENT		2	/* X compat, unsupported */
  #define	TR_UNTRANS_EVENT	3

These certainly don't require kernel support (or the SunOS server wouldn't
work), but the server code references them and having them defined avoids
having to #ifdef out those blocks of code.

I don't have a lot of time to play with this, but on the other hand the
core dump I'm getting currently is not in a particularly ugly piece of
code so there may not be much wrong.  I'll try to recompile the server
with debugging symbols and see if I can make some progress.

Dennis Ferguson

------------------------------------------------------------------------------