Qdatasheet_Logo
Integrated circuits, Transistor, Semiconductors Search and Datasheet PDF Download Site

ST486SMM View Datasheet(PDF) - STMicroelectronics

Part Name
Description
MFG CO.
ST486SMM
ST-Microelectronics
STMicroelectronics ST-Microelectronics
'ST486SMM' PDF : 34 Pages View PDF
ST486DX - SMM SOFTWARE CONSIDERATIONS
and restore instruction should be used. This can be accomplished by using the following code
example:
; Save the FPU state
mov eax,CR0
or
eax,00000001h
mov CR0,eax
jmp $+2
db
66h
fnsave [save_fpu]
mov eax,CR0
and eax, 0FFFFFFFEh
mov CR0,eax
;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
;now the SMM routine can do any FPU instruction.
;Restore the FPU state before executing a RSM
mov eax,CR0
or
eax,00000001h
mov CR0,eax
;set the PE bit in CR0
jmp $+2
;clear the prefetch que
db
66h
;do 32bit version of fnsave
frstor [save_fpu]
;restore the FPU state
;Some assemblers may require
;use of the fnrstor instruction
mov eax,CR0
and eax, 0FFFFFFFEh ;clear PE bit in CR0
mov CR0,eax
;return to real mode
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 Initializing the SMM Environment
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
31
Share Link: GO URL

All Rights Reserved © qdatasheet.com  [ Privacy Policy ] [ Contact Us ]