17.05.2015 Views

TI486 Microprocessor - Al Kossow's Bitsavers

TI486 Microprocessor - Al Kossow's Bitsavers

TI486 Microprocessor - Al Kossow's Bitsavers

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Loading SMM Memory<br />

A.8 Loading SMM Memory With an SMM Program from Main Memory<br />

SMI 1<br />

SMAC 1<br />

MMAC 1<br />

SM4 1<br />

To load SMM memory with an 8MI interrupt handler it is important that the SMI<br />

interrupt does not occur before the handler is ready to accept it. This can be<br />

done by not having SMAC = 0 and SM I = 1 (in the CCR 1 register) before the<br />

8MI handler is installed. It is necessary to set SM4 = 1 and ARR4 with<br />

appropriate values before using the SMM memory. To load SMM memory with<br />

a program it is first necessary to enable SMM with the exception of the SMI pin<br />

by setting SMAC. (See Section A.3.) The SMM region is then mapped over<br />

main memory at the same location. This is done by the generation of SMADS<br />

for memory access for the SMI. A REP MOV instruction can then be used to<br />

transfer the program to the location. Then, turn off SMAC to activate potential<br />

8Mls.<br />

shl 1<br />

shl 2<br />

shl 3<br />

shl 7<br />

mov<br />

out<br />

in<br />

mov<br />

mov<br />

out<br />

mov<br />

or<br />

out<br />

mov<br />

mov<br />

mov<br />

mov<br />

mov<br />

mov<br />

rep<br />

mov<br />

out<br />

in<br />

mov<br />

mov<br />

out<br />

mov<br />

and<br />

out<br />

al, Oclh<br />

22h, al<br />

al, 23h<br />

ah,al<br />

al, Oclh<br />

22h, al<br />

al, ah<br />

al, SMI or SMACi<br />

23h, al<br />

ax, SMI_SEGMENT<br />

es, ax<br />

edi, 0<br />

index to CCrl<br />

select CCRl register<br />

read current CCRl value<br />

index to CCRl<br />

select CCRl register<br />

write new value to CCRl<br />

istart of the SMM area<br />

esi, offset SMI_ROUTINE<br />

ds,seg SMI_ROUTINE<br />

ecx, (SMI_ROUTINE_LENGTH+3)/4<br />

movs dword ptr es: [edi],dword ptr ds: [esi]<br />

al,Oclh<br />

index to CCRl<br />

22h, al select CCRl register<br />

al, 23h<br />

ah,al<br />

al, Oclh<br />

22h, al<br />

al, ah<br />

al,NOT SMAC<br />

23h, al<br />

read current CCRl value<br />

index to CCRl<br />

select CCRl register<br />

idisable SMAC, enable SMI#<br />

i write new value to CCRl<br />

A-30<br />

<strong>TI486</strong> SMM Programmer's Guide

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!