I was wondering (and looking through the APM sources) what would be
required to call a 16-bit BIOS interrupt from the kernel. Here's what
I'd like to do:
On initialization:
* Set up a 'fake' 0000:0000 (BIOS scratch) segment
* Call the VGA BIOS's initialization code (can only access the 'fake' seg)
* Get the VGA int 0x10 vector from 0000:0040
* Save the 'fake' segment for later user
On BIOS calls:
* Restore the 'fake' segment
* Call the 16-bit VGA bios routine (mode check, mode change, palette, etc)
* Save the 'fake' segment away
On cleanup:
* Free the 'fake' segment
What do I need to do? The APM BIOS stuff is all over the place.
PLEASE NOTE: For all the other kernel developers, this (generalized to
all BIOS roms) could be a nice feature to throw into 2.1
as an 'experimental' option that is only present in development
kernels. (Ie it would be removed for 2.2, but present in 2.3)
This way developers would have a nice, well-know piece of
code to perform BIOS calls through. (but, since it will not
be in production kernels, can only be used for bootstrapping
development for new drivers...) Not to mention the performance
hits....