[OpenBIOS] Calling VGA init routine
stepan at suse.de
Thu Mar 7 18:26:14 CET 2002
> I am writing my own BIOS for an x86 system, and have
> it running and booting an OS pretty well, as long as
> everything is on the serial port. I figure I need to
> call init of the VGA BIOS to have the video card
You should have a look at the LinuxBIOS Mailinglist archives,
this was heavily discussed there the last few days:
> I would like to know how I can gop about doing this.
> If anyone have a code snippet, for calling the VGA
> BIOS it would be great! I would very much appreciate
> it if someone has this code handy or give me a pointer
> to where I can find it.
Basically, you have two different approaches:
1) Looking at what the graphics adapter bios does with the hardware.
This is a less generic way and it has to be done for every single
graphics adapter to be supported. You can patch XFree86's bios
emulation to trace all hardware access to see what your bios does
with your graphics card. You might need a non-x86 platform pci
machine for that. Or you look at the PCI cards config registers after
it has been initialized and write those values to the card yourself.
The later is probably not working for all graphics cards, as those
tend to be flawed by design.
2) create the infrastructure necessary to execute the graphics card's
bios. First off, you have to provide int10/1a bios wrappers, for
pci detection and alike. For x86 platforms you have to run the card
firmware in vm86 mode. Examples can be found in dosemu.
For non-x86 you have to provide an x86 emulation, such as scitech's
x86emu (which is used by XFree86)
Ok hex 4666 dup negate do i 4000 dup 2* negate do " *" 0 dup 2dup 1e 0 do
2swap * e >>a 2* 5 pick + -rot - j + dup dup * e >>a rot dup dup * e >>a
rot swap 2dup + 10000 > if 3drop 3drop " " 0 dup 2dup leave then loop
2drop 2drop type 268 +loop cr drop 5de +loop
To unsubscribe: send mail to majordomo at freiburg.linux.de
with 'unsubscribe openbios' in the body of the message
http://www.freiburg.linux.de/OpenBIOS/ - free your system..
More information about the openbios