为什么MBOOT.C32在引导过程中不分配Framebuffer?
使用Multiboot标准启动时,您可以请求符合多机兼容的启动加载程序,以分配框架缓冲程序以写入多台标头中的第二位。
但是,当我执行此操作并尝试使用MBOOT.C32使用QEMU启动时,QEMU会像帧缓冲区一样切换到图形模式,但是当我检查返回的Multiboot struct上的标志时,未设置13个位,则,并且没有返回FrameBuffer信息。
我尝试设置宽度,高度,位深度的不同值,以查看是否会改变任何东西,但这无济于事。
这是我的Multiboot标头(这是在加载程序脚本的最前面):
".section .multiboot\n"
".code32\n"
/* Multiboot 1 header */
".align 4\n"
".long 0x1badb002\n"
/* Aligned on 4KiB pages + information on memory + graphics mode*/
".long 7\n"
".long -0x1badb002-7\n"
/* Flags */
".long 0\n"
".long 0\n"
".long 0\n"
".long 0\n"
".long 0\n"
/* Graphics mode enabled */
".long 0\n"
/* Width, height, bit depth */
".long 0\n"
".long 0\n"
".long 0\n"
然后,我在EAX中检查0x2badb002
值,将Multiboot Struct Pointer保存在变量中,并调用一个函数,以检查该功能框架的有效性。在这里,我意识到未设置FrameBuffer信息标志位。我是否缺少规格中的东西?还是mboot.c32的工作方式不同?
When booting with the multiboot standard you can request the multiboot-compliant boot loader to allocate a framebuffer to write to using the second bit in the multiboot header.
However, when I do this and try to boot via cdrom with mboot.c32 using QEMU, QEMU switches into the graphics mode as if the frame buffer was there, but when I check the flags on the returned multiboot struct the 13th bit is not set, and no framebuffer info was returned.
I've tried setting different values for width, height, bit depth to see if that changes anything, but that didn't help.
Here's my multiboot header (this is put at the very front in the loader script):
".section .multiboot\n"
".code32\n"
/* Multiboot 1 header */
".align 4\n"
".long 0x1badb002\n"
/* Aligned on 4KiB pages + information on memory + graphics mode*/
".long 7\n"
".long -0x1badb002-7\n"
/* Flags */
".long 0\n"
".long 0\n"
".long 0\n"
".long 0\n"
".long 0\n"
/* Graphics mode enabled */
".long 0\n"
/* Width, height, bit depth */
".long 0\n"
".long 0\n"
".long 0\n"
I then check for the 0x2badb002
value in eax, save the multiboot struct pointer in a variable and call a function that checks the validity of the framebuffer. This is where I realize that the framebuffer info flag bit is not set. Am I missing something from the specification? Or does mboot.c32 work different?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论