ST486DX ST Microelectronics, ST486DX Datasheet - Page 21

no-image

ST486DX

Manufacturer Part Number
ST486DX
Description
PROGRAMMING MANUAL
Manufacturer
ST Microelectronics
Datasheet
and restore instruction should be used. This can be accomplished by using the following code
example:
Be sure that all interrupts are disabled before using this method for entering protected mode. Any
attempt to load a selector register while in protected mode will shutdown the CPU since no GDT is
set up. Setting up a GDT and doing a long jump to enter protected mode will also work correctly.
3.4
After entering SMM and saving the CPU registers that will be used by the SMM routine, a few
registers need to be initialized.
Segment registers need to be initialized if the CPU was operating in protected mode when the SMI
interrupt occurred. Segment registers that will be used by the SMM routine need to be loaded with
known limits before they are used. The protected mode application could have set a segment limit
to less than 64K. To avoid a protection error, all segment registers can be given limits of 4 GBytes.
This can be done with the SGS Thomson RSDC instruction and will allow access to the
; Save the FPU state
;now the SMM routine can do any FPU instruction.
;Restore the FPU state before executing a RSM
Initializing the SMM Environment
mov
or
mov
jmp
db
fnsave [save_fpu]
mov
and
mov
mov
or
mov
jmp
db
frstor [save_fpu]
mov
and
mov
eax,CR0
eax,00000001h
CR0,eax
$+2
66h
eax,CR0
eax, 0FFFFFFFEh
CR0,eax
eax,CR0
eax,00000001h
CR0,eax
$+2
66h
eax,CR0
eax, 0FFFFFFFEh
CR0,eax
ST486DX - SMM SOFTWARE CONSIDERATIONS
;set the PE bit in CR0
;clear the prefetch que
;do 32bit version of fnsave
;saves fpu state to
;the address DS:[save_fpu]
;clear PE bit in CR0
;return to real mode
;set the PE bit in CR0
;clear the prefetch que
;do 32bit version of fnsave
;restore the FPU state
;Some assemblers may require
;use of the fnrstor instruction
;clear PE bit in CR0
;return to real mode
31

Related parts for ST486DX