[klibc] Supporting multiple video cards under Linux

Jon Smirl jonsmirl at yahoo.com
Sat Jan 24 17:32:31 PST 2004


There is an x86 emulator that can be used to run the ROM. It's about 140K in
size. You get the same problem when you plug x86 PCI cards into Macs. The x86
cards have the wrong ROMs on them. Of course the Mac version cost twice as much.
 The x86 emulator would probably be a nice optional feature for these other
architectures.

I'll send you a copy of the older source. I'm starting from a program I found
that was written about five years ago and I'm updating it to use sysfs, hotplug,
etc on 2.6. I don't have the new version working yet.

--- "H. Peter Anvin" <hpa at zytor.com> wrote:
> Jon Smirl wrote:
> > Supporting multiple video cards under Linux
> > 
> > When there are multiple video cards in a machine the system BIOS only
> > initializes one of them.  So I'm working on a version of the DRI drivers
> that
> > will initialize these non-primary video cards.  The new DRI driver achieves
> this
> > via generating a hotplug event that runs a user space program when the
> driver is
> > first loaded.
> > 
> > This user space program needs to run very early since you may want to use
> one of
> > these cards for your console. Because of this I'm looking at klibc and the
> early
> > boot environment. The reset program works by getting a copy of the card's
> VBIOS
> > and calling it's reset function. To do this the user space app needs to go
> into
> > VM86 mode, or on non-86 architectures run a x86 emulator if need be. You
> can't
> > call the VBIOS from a device driver becuase it has been written assuming
> that it
> > will be run in real mode, not protected mode.
> > 
> > I tried linking to klibc but I'm missing some key pieces. I need things like
> > inb/w/l(), outb/w/l(), iopl(), and vm86 support. Is it possible to get these
> > added to klibc? These are probably all macros simply generating ASM
> instructions
> > or calling the kernel VM86 entry point.
> > 
> 
> Should be easy enough.  Note that if you require vm86 support, you won't 
> be able to port these drivers to x86-64.
> 
> 	-hpa


=====
Jon Smirl
jonsmirl at yahoo.com

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/



More information about the klibc mailing list