How to use real mode BIOS / VESA calls from GRUB?

我只是一个虾纸丫 提交于 2019-12-12 06:04:21

问题


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?


回答1:


As far as I can see, grub uses the function grub_bios_interrupt to call 16-bit interrupts. This function internally uses the prot_to_real function to switch to real mode and real_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 like grub_bios_interrupt does.




回答2:


You could just use a BIOS extender. They allow you to use real mode interrupts from protected mode! I haven't used them myself, though I've heard they really work. An example is SudoBIOS which was able to boot MikeOS in protected mode, although I can't vouch for it myself.



来源:https://stackoverflow.com/questions/30747574/how-to-use-real-mode-bios-vesa-calls-from-grub

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!