
2-80
PRELIMINARY
Shutdown and Halt
Advanci ng the S tandar ds
Shutdown and Halt
2-80
The complete state of the FPU can be saved and
restored with the FNSAVE and FNRSTOR
instructions. FNSAVE is used instead of the
FSAVE because FSAVE will wait for the FPU to
check for existing error conditions before
storing the FPU state. If there is a unmasked
FPU exception condition pending, the FSAVE
instruction will wait until the exception condi-
tion is serviced. To maintain transparency for
the application program, the SMM routine
should not service this exception. If the FPU
state is restored with the FNRSTOR instruction
before returning to normal mode, the applica-
tion program can correctly service the excep-
tion. FPU instructions can be executed within
SMM once the FPU state has been saved.
The information saved with the FSAVE instruc-
tion varies depending on the operating mode of
the CPU. To save and restore all FPU informa-
tion, the 32-bit protected mode version of the
FPU save and restore instruction should be
used.
CPU States Related to SMM and Suspend
Mode
The state diagram shown in Figure 2-39 (Page
2-81) illustrates the various CPU states associ-
ated with SMM and suspend mode. While in
the SMI service routine, the M II CPU can enter
suspend mode either by (1) executing a halt
(HLT) instruction or (2) by asserting the SUSP#
input.
During SMM operations and while in SUSP#
initiated suspend mode, an occurrence of
SMI#, NMI, or INTR is latched. (In order for
INTR to be latched, the IF flag must be set.)
The INTR or NMI is serviced after exiting
suspend mode.
If suspend mode is entered via a HLT instruc-
tion from the operating system or application
software, the reception of an SMI# interrupt
causes the CPU to exit suspend mode and enter
SMM.
2.16
Shutdown and Halt
The Halt Instruction (HLT) stops program ex-
ecution and prevents the processor from using
the local bus until restarted. The M II CPU then
issues a special Stop Grant bus cycle and enters
a low-power suspend mode if the SUSP_HLT bit
in CCR2 is set. SMI, NMI, INTR with interrupts
enabled (IF bit in EFLAGS=1), WM_RST or RE-
SET forces the CPU out of the halt state. If inter-
rupted, the saved code segment and instruction
pointer specify the instruction following the
HLT.
Shutdown occurs when a severe error is detected
that prevents further processing. An NMI input
can bring the processor out of shutdown if the
IDT limit is large enough to contain the NMI
interrupt vector and the stack has enough room
to contain the vector and flag information.
Otherwise, shutdown can only be exited by a
processor reset.