Linux 2.6 中如何从保护模式切换到实模式?

发布于 2024-07-18 12:17:33 字数 32 浏览 10 评论 0原文

Linux 2.6 中如何从保护模式切换到实模式?

How do we shift from protected mode to real mode in Linux 2.6?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

清欢 2024-07-25 12:17:33

你不。

内核根本无法在实模式下运行,也无法(合理地)进行 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.

三人与歌 2024-07-25 12:17:33

如果您确实需要硬件上的实模式,您还可以查看FreeDOS

You could also take a look at FreeDOS if you really need real mode on the hardware.

伊面 2024-07-25 12:17:33

内核在引导/启动序列的一开始就从实模式切换到保护模式,并且没有回头路。
有关更多详细信息,请参阅引导加载程序如何工作

如果你有一些程序需要实模式,有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.

情泪▽动烟 2024-07-25 12:17:33

ELKS Linux 端口可以实现实模式,但它远不及 2.6。

The ELKS Linux port can do real mode, but its nowhere near 2.6.

药祭#氼 2024-07-25 12:17:33

我们可以通过编写一些代码作为内核的一部分来从保护模式切换到实模式。

最主要的是在禁用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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文