Re: xserver on OpenGL
"Kendall Bennett" <[email protected]>
| Newsgroups | gmane.comp.freedesktop.xserver |
|---|---|
| Organization | SciTech Software, Inc. |
| Message-ID | <3FD0D3BB.9952.49C059CF@localhost> |
Jon Smirl <jonsmirl-/[email protected]> 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 can do it manually with a small program from Scitech that copies the > VBIOS into RAM and uses VM86 to call C000:0003. C000:0003 is the boot > time initialization vector. Xfree seems to be initializing the card > through some other mechanism, maybe an Int10 call. XFree86 uses the same x86emu emulator library that we use in SNAP (I did most of the work to make this functional, and Egbert has been keeping our tree and the X trees in sync). Using the emulator library you can bring up a secondary controller in a similar manner to what you mention above. The code to do all that is in our GPL depot, and you can build up a stand alone program called 'warmboot' that can do this using the emulator. Of course the catch is that on the secondary controller you need to use the emulator to handle the BIOS calls. I am pretty sure XFree86 uses the emulator for the second head, although on Linux that is not entirely necessary. You can use the copy-on-write features of the kernel to copy the BIOS image from the PCI ROM to 0xC0000 and then execute the BIOS post code, which will bring up the card and allow you to use real v86 mode. We generally don't do that as the emulator is more cross platform (plus we finally nailed some nasty bugs in the emulator a few weeks back and now I can't find a single card that doesn't work with 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? We generally do all debugging on a separate machine and use TCP/IP or parallel port for the connection. For drivers we develop from Windows 2000/XP and run the debug code under 32-bit DOS or OS/2 console mode using Open Watcom (and with Open Watcom 1.2 we can debug our driver modules with full source code debugging ;-). For XFree86 debugging I ssh into a Red Hat 7.3 box to build and debug the modules (my main box is Red Hat 8.0). Unfortunately the hacked up GDB does not work very well with anything by XFree86 7.3, so if we debug on 8.0 we cannot debug the XFree86 driver modules with source code. Also the Linux port of Open Watcom is coming along nicely, and I am hoping eventually I can ditch Windows XP and instead build on Linux. I doubt I will debug on Linux except for Linux specific stuff though, as we have a pretty solid DOS or OS/2 console boot that can both handle hard crashes and re-boot quickly in case of failure. When Open Watcom is done for Linux, I can build on Linux and remote debug via TCP/IP or parallel port to OS/2 or DOS (actually you can do that today if you build from the latest source code). Even with ext-3 I have had hard crashes during debugging that have taken out my entire Linux distro requiring me to restore it from a Drive Image image. Regards, --- Kendall Bennett Chief Executive Officer SciTech Software, Inc. Phone: (530) 894 8400 http://www.scitechsoft.com ~ SciTech SNAP - The future of device driver technology! ~