xserver on OpenGL
Keith Packard
keithp@keithp.com
Fri, 05 Dec 2003 17:58:27 -0800
Around 17 o'clock on Dec 5, Jon Smirl wrote:
> Rage128 is set as my primary adapter to the BIOS. This means my Radeon 9000 does
> not get initialized when my PC boots. Xfree knows how to initialize it as a
> secondary adapter, how does XFree do this?
I think XFree86 remaps the PCI bus to move the secondary card into the ISA
addreses for the video card, copies the BIOS off of the card and then
runs the boot time initialization vector, using either VM86 (?) or a
software x86 emulator (useful for non-x86 machines).
I'll admit that this is all from memory though, so there may be slight
errors in it.
> I also disable VT support in my target environment. I have two keyboards/mice. I
> set the target to use the secondary keyboard/mice. Now I can run a debugger in X
> on my Rage128 while I have a fully capable target system. Is there a better
> scheme for doing this?
The traditional technique is to have two systems and just use a machine
with only one graphics card as the target machine, accessing it over the
network. I'm frankly amazed that you've managed to get things working in
a single machine.
While supporting multiple video cards from user mode is a neat trick, I'm
not too concerned about getting it running right away, especially using
VBE for initialization. Changing the PCI configuration from user mode is
not my idea of solid driver design, so we'll need some level of kernel
cooperation for that at least.
> I'm looking at the kdrive VBE support right now. In the OpenGL model kdrive
> doesn't need this code, it would be in a library used by the lower layers.
Yup. I'm looking forward to not having that code in the X server;
deleting code is one of my favorite activities.
I've been chatting a bit with the ACPI folks; there are rumors that some
ACPI implementations resume the machine without POSTing the video card, so
even text-mode systems will require video support. Obviously the easiest
code to use for that is sitting on the video card, but that will entail
some mechanism for running real-mode code as ACPI resumes the machine.
It may turn out that the kernel will end up supporting Int10 calls from
protected mode much as Windows did, in which case we may want to leverage
that for some of this functionality as well. Using "real" real-mode
instead of vm86 will work better with video cards anyway.
-keith