且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在x86_64的输入64位模式

更新时间:2023-11-12 23:14:22

为了使64位的能力了,你必须将CPU切换到长模式。

In order to enable 64 bit capabillities, you must switch the CPU to Long Mode.

要在6​​4位x86处理器进入长模式(X86-64):

To enter Long Mode on a 64-bit x86 processor (x86-64):

If paging is enabled, disable paging.
If CR4.PAE is not already set, set it.
Set IA32_EFER.LME = 1.
Load CR3 with a valid PML4 table.
Enable paging.
At this point you will be in compatibility mode. A far jump may be executed to switch to long mode. However, the offset must not exceed 32-bit.