
2-74
PRELIMINARY
System Management Mode
Advanci ng the S tandar ds
System Management Mode
2-74
Current and Next IP Pointers
Included in the header information are the
Current and Next IP pointers. The Current IP
points to the instruction executing when the
SMI was detected and the Next IP points to the
instruction that will be executed after exiting
SMM.
Normally after an SMM routine is completed,
the instruction flow begins at the Next IP
address. However, if an I/O trap has occurred,
instruction flow should return to the Current IP
to complete the I/O instruction.
If SMM has been entered due to an I/O trap for
a REP INSx or REP OUTSx instruction, the
Current IP and Next IP fields contain the same
address.
If an entry into SMM mode was caused by an
I/O trap, the port address, data size and data
value associated with that I/O operation are
stored in the SMM header. Note that these
values are only valid for I/O operations. The I/O
data is not restored within the CPU when
executing a RSM instruction.
Under these circumstances the I and P bits, as
well as ESI/EDI field, contain valid information.
Also saved are the contents of debug register 7
(DR7), the extended flags register (EFLAGS),
and control register 0 (CR0).
If the S bit in the SMM header is set, the SMM
entry resulted from an SMINT instruction.
SMM Header Address Pointer
The SMM Header Address Pointer Register
(SMHR) (Figure 2-38) contains the 32-bit SMM
Header pointer. The SMHR address is dword
aligned, so the two least significant bits are
ignored.
The SMHR valid bit (bit 0) is cleared with every
write to ARR3 and during a hardware RESET.
Upon entry to SMM, the SMHR valid bit is
examined before the CPU state is saved into the
SMM memory space header. When the valid bit
is reset, the SMM header pointer will be calcu-
lated (ARR3 base field + ARR3 size field) and
loaded into the SMHR and the valid bit will be
set.
If the desired SMM header location is different
than the top of SMM memory space, as may be
the case when nesting SMI’s, then the SMHR
register must be loaded with a new value and
valid bit from within the SMI routine before
nesting is enabled.
The SMM memory space header can be relo-
cated using the new RDSHR and WRSHR
instructions.
Figure 2-38. SMHR Register
31
2
1
0
SMHR
Res
V
Table 2-37. SMHR Register Bits
BIT
POSITION
DESCRPTION
31 - 2
SMHR header pointer address.
1
Reserved
0
Valid Bit