[klibc] Supporting multiple video cards under Linux

H. Peter Anvin hpa at zytor.com
Sat Jan 24 16:56:20 PST 2004


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



More information about the klibc mailing list