问题描述
我正在开发一个简单的Grub模块,它将在启动过程的早期阶段启用一些其他视频设置/初始化.我实际的最佳想法是为该任务使用一些VESA调用.
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.
不幸的是,最近我发现Grub无法提供实模式调用.
Unfortunately, recently I've found real mode calls are unavailable from the Grub.
但是GRUB可以执行非常复杂的操作,如果没有BIOS的帮助,这可能是无法想象的.
But the GRUB can do really complex operations which are probably unimaginable without the help of the BIOS.
怎么可能?我怎么能从the叫BIOS?
How is it possible? How could I call the bios from the grub?
推荐答案
据我所知,grub使用功能 grub_bios_interrupt
来调用16位中断.此函数在内部使用 功能可切换为实模式,而real_to_prot
功能可切换回实模式.我猜您也应该也可以使用这些功能,但是也许您需要像grub_bios_interrupt
一样将它们包装在一个功能中.
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.
这篇关于如何使用GRUB的实模式BIOS/VESA调用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!