本文共 3471 字,大约阅读时间需要 11 分钟。
声明:原文版权归属Intel®,这里仅作学习使用
来源:Intel® 64 and IA-32 Architectures Software Developer's Manual Volume 3A: System Programming Guide, Part 1
Chapter 2.2 MODES OF OPERATION 运行模式
The IA-32 supports three operating modes and one quasi-operating mode(三个运行模式和一个准运行模式):
Intel 64 architecture supports all operating modes of IA-32 architecture and IA-32e modes:
Figure 2-3 shows how the processor moves between operating modes.
Figure 2-3. Transitions Among the Processor’s Operating Modes
The processor is placed in real-address mode following power-up or a reset. The PE flag in control register CR0(CR0控制寄存器中的PE标志位) then controls whether the processor is operating in real-address or protected mode. See also: Section 9.9, “Mode Switching.”
The VM flag in the EFLAGS register(EFLAGS寄存器中的VM标志位) determines whether the processor is operating in protected mode or virtual-8086 mode. Transitions between protected mode and virtual-8086 mode are generally carried out as part of a task switch or a return from an interrupt or exception handler. See also: Section 15.2.5, “Entering Virtual-8086 Mode.” The LMA bit (IA32_EFER.LMA.LMA[bit 10]) determines whether the processor is operating in IA-32e mode. When running in IA-32e mode, 64-bit or compatibility sub-mode operation is determined by CS.L bit of the code segment. The processor enters into IA-32e mode from protected mode by enabling paging and setting the LME bit (IA32_EFER.LME[bit 8]). See also: Chapter 9, “Processor Management and Initialization.” The processor switches to SMM whenever it receives an SMI while the processor is in real-address, protected, virtual-8086, or IA-32e modes(无论在上述何种模式下,处理器收到SMI中断就切换到SMM模式). Upon execution of the RSM instruction(RSM指令), the processor always returns to the mode it was in when the SMI occurred.