Intel 64 and IA-32 Architectures Software Developers Manual Volume 3B, System Programming Guide Part 2

Table Of Contents
Vol. 3 25-21
SYSTEM MANAGEMENT
returning from the SMI handler, the I/O instruction restart mechanism can be used to
re-execute the I/O instruction that caused the SMI.
The I/O instruction restart field (at offset 7F00H in the SMM state-save area, see
Figure 25-5) controls I/O instruction restart. When an RSM instruction is executed, if
this field contains the value FFH, then the EIP register is modified to point to the I/O
instruction that received the SMI request. The processor will then automatically re-
execute the I/O instruction that the SMI trapped. (The processor saves the necessary
machine state to insure that re-execution of the instruction is handled coherently.)
If the I/O instruction restart field contains the value 00H when the RSM instruction is
executed, then the processor begins program execution with the instruction following
the I/O instruction. (When a repeat prefix is being used, the next instruction may be
the next I/O instruction in the repeat loop.) Not re-executing the interrupted I/O
instruction is the default behavior; the processor automatically initializes the I/O
instruction restart field to 00H upon entering SMM. Table 25-8 summarizes the states
of the I/O instruction restart field.
Note that the I/O instruction restart mechanism does not indicate the cause of the
SMI. It is the responsibility of the SMI handler to examine the state of the processor
to determine the cause of the SMI and to determine if an I/O instruction was inter-
rupted and should be restarted upon exiting SMM. If an SMI interrupt is signaled on
a non-I/O instruction boundary, setting the I/O instruction restart field to FFH prior to
executing the RSM instruction will likely result in a program error.
25.12.1 Back-to-Back SMI Interrupts When I/O Instruction Restart Is
Being Used
If an SMI interrupt is signaled while the processor is servicing an SMI interrupt that
occurred on an I/O instruction boundary, the processor will service the new SMI
request before restarting the originally interrupted I/O instruction. If the I/O instruc-
Figure 25-5. I/O Instruction Restart Field
Table 25-8. I/O Instruction Restart Field Values
Value of Flag After
Entry to SMM
Value of Flag When
Exiting SMM
Action of Processor When Exiting SMM
00H
00H
00H
FFH
Does not re-execute trapped I/O instruction.
Re-executes trapped I/O instruction.
015
I/O Instruction Restart Field
Register Offset
7F00H