xorg for alpha: it's there !

Hi,
I got our in-tree xorg to work properly on alpha. I tested the
glint, mga, s3, s3virge, tga and vga drivers on both PWS500 (ev56, non-BWX)
and XP1000 (ev6, BWX) platforms. All of them works as expected, and
X -configure is working too. Some of them needs Int10 to be disabled,
I think because xorg's PC emulator is incomplete (it complains about
non-implemented instructions when running the adapter's BIOS).
There a 2 attached patches for this: the first one adds alpha support
to our Makefiles, sets lists, etc ...
The second one fixes 3 issues in the xorg distrib:
- xf86sym.c: in?/out? are macro to a function pointer on NetBSD/alpha, so
SYMFUNC can't work here. Just don't SYMFUNC() these on NetBSD/alpha.
Should be no problems to get it upstream
- alpha_video.c:
on the XP1000, the abw[] array is only one element (there's no
sparse mapping), so make memory_base() return the same as dense_base()
in this case instead of returning a bogus value read out of bound from
abw[] (checking FreeBSD and OpenBSD kernel sources it's the right thing
TO do). This is NetBSD-specific code so should be no problems to get it
upstream
- bsd_ev56.c: To read/write byte or word from the dense mapping we
have to use the appropriate assembly instructions. The C code here
would always read 32bits, discarding 16 or 24 or then, or write
32bits though a read/modify/write. This is bad because you don't know
what the registers next to the one you're reading/writing it.
If it's e.g. one side of a fifo, you write extra values or discard
data from it, and you loose.
This code is common to all BSDs/alpha (and so it broken for others too).
OpenBSD has <machine/bwx.h> and the alpha_* byte/word macros, so it
should work here. FreeBSD has dropped alpha support so I don't know
if we should really care.
Now before alpha can be switched to xorg we need to support the
turbochannel video adapters driven by XdecNetBSD or XalphaNetBSD.
I think the easiest would be to convert the kernel drivers for these
to wscons and use xorg's wsfb but I've not way to test this. Any
takers ?
--
Manuel Bouyer, LIP6, Universite Paris VI.
Manuel.Bouyer%lip6.fr@localhost
NetBSD: 26 ans d'experience feront toujours la difference
--