Linux 2.6 中如何从保护模式切换到实模式?
Linux 2.6 中如何从保护模式切换到实模式?
How do we shift from protected mode to real mode in Linux 2.6?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
Linux 2.6 中如何从保护模式切换到实模式?
How do we shift from protected mode to real mode in Linux 2.6?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
你不。
内核根本无法在实模式下运行,也无法(合理地)进行 BIOS 调用,因此您无论如何也无法执行任何操作。
您可能会了解 DosEMU 如何使用 v86 模式来运行“实模式”代码,但仅此而已。
You do not.
The kernel cannot function at all in real mode, nor can bios calls be (sensibly) made, so you wouldn't be able to do anything anyway.
You might look at how DosEMU uses v86 mode to run your "real mode" code, but that's all.
如果您确实需要硬件上的实模式,您还可以查看FreeDOS。
You could also take a look at FreeDOS if you really need real mode on the hardware.
内核在引导/启动序列的一开始就从实模式切换到保护模式,并且没有回头路。
有关更多详细信息,请参阅引导加载程序如何工作。
如果你有一些程序需要实模式,有v86模式。 一些 工作正在进行中,以在 64 位模式下添加对此的支持。
The kernel switches from real mode to protected mode during the very beginning of the boot/start sequence and there is no turning back.
See How Boot Loaders Work for more detailed information.
If you have some program that needs real mode, there is v86 mode. Some work is ongoing to add support for this in 64 bit mode.
ELKS Linux 端口可以实现实模式,但它远不及 2.6。
The ELKS Linux port can do real mode, but its nowhere near 2.6.
我们可以通过编写一些代码作为内核的一部分来从保护模式切换到实模式。
最主要的是在禁用cr0寄存器上的PE位后,我们需要加载适当的GDT、LDT、IDT。
只需点击此链接即可了解更多详细信息http://www.sudleyplace.com/pmtorm.html。
We can switch from protected mode to real mode, by writing some lines of code as the part of kernel.
The main thing is after disabled the PE bit on cr0 register, we need to to load the appropriate GDT, LDT, IDT.
Just follow this link for more details http://www.sudleyplace.com/pmtorm.html.