rsm
Resume from System Management Mode
RSM
Exits SMM and returns to previous state (Privileged).
Details
Resumes normal CPU operation from System Management Mode (SMM), restoring processor state from the SMM state save area and resuming execution at the return instruction pointer saved at SMM entry. This instruction is privileged and can only be executed inside SMM. The CPU context (all registers, segment descriptors, and memory-type ranges) is restored atomically, and control flow returns to the interrupted code or handler.
Pseudocode Operation
restore_cpu_state_from_smm_save_area();
return_eip ← SMM_SAVE_AREA[return_address_offset];
jump(return_eip);
Example
RSM
Encoding
Binary Layout
0F
+0
AA
+1
Operands
Reference (Intel® SDM)
Instruction Forms
| Opcode | Instruction | Op/En | 64/32-bit Mode | CPUID | Description |
|---|---|---|---|---|---|
| 0F AA | RSM | ZO | Valid Valid | Resume operation of interrupted program. |
Description
Returns program control from system management mode (SMM) to the application program or operating-system procedure that was interrupted when the processor received an SMM interrupt. The processor’s state is restored from the dump created upon entering SMM. If the processor detects invalid state information during state restoration, it enters the shutdown state. The following invalid information can cause a shutdown:
• Any reserved bit of CR4 is set to 1.
• Any illegal combination of bits in CR0, such as (PG=1 and PE=0) or (NW=1 and CD=0).
• (Intel Pentium and Intel486™ processors only.) The value stored in the state dump base field is not a 32-KByte aligned address.
The contents of the model-specific registers are not affected by a return from SMM.
The SMM state map used by RSM supports resuming processor context for non-64-bit modes and 64-bit mode.
See Chapter 34, “System Management Mode,” in the Intel® 64 and IA-32 Architectures Software Developer’s
Manual, Volume 3C, for more information about SMM and the behavior of the RSM instruction.
Operation
ReturnFromSMM; IF (IA-32e mode supported) or (CPUID DisplayFamily_DisplayModel = 06H_0CH ) THEN ProcessorState := Restore(SMMDump(IA-32e SMM STATE MAP)); Else ProcessorState := Restore(SMMDump(Non-32-Bit-Mode SMM STATE MAP)); FI
Flags Affected
All.
Exceptions
Protected Mode Exceptions
#UD If an attempt is made to execute this instruction when the processor is not in SMM.
If the LOCK prefix is used.
#GP(0) If CPL > 0 and IA32_CORE_CAPABILITIES.RSM_IN_CPL0_ONLY[bit 3] = 1.
Real-Address Mode Exceptions
#UD If an attempt is made to execute this instruction when the processor is not in SMM.
If the LOCK prefix is used.
Virtual-8086 Mode Exceptions
#UD If an attempt is made to execute this instruction when the processor is not in SMM.
If the LOCK prefix is used.
RSM—Resume From System Management Mode Vol. 2B 4-592
#GP(0) If IA32_CORE_CAPABILITIES.RSM_IN_CPL0_ONLY[bit 3] = 1.
Compatibility Mode Exceptions
Same exceptions as in protected mode.
64-Bit Mode Exceptions
Same exceptions as in protected mode.
RSM—Resume From System Management Mode Vol. 2B 4-593