I am developing a simple Grub module which would enable some additional video settings/initializations at the early stage of the boot process. My actual best idea would be to use some VESA calls for the task.
Unfortunately, recently I've found real mode calls are unavailable from the Grub.
But the GRUB can do really complex operations which are probably unimaginable without the help of the BIOS.
How is it possible? How could I call the bios from the grub?
As far as I can see, grub uses the function
grub_bios_interrupt
to call 16-bit interrupts. This function internally uses theprot_to_real
function to switch to real mode andreal_to_prot
to switch back. I'm guessing you should be able to use these functions too, but perhaps you would need to wrap them in a function likegrub_bios_interrupt
does.