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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Detection of SMM Capable Version<br />

i*********************************************<br />

i****** get present illegal opcode handler<br />

i*********************************************<br />

push es<br />

push bx<br />

mov ax, 3506h<br />

int 21h<br />

mov old_seg, es<br />

mov old_off, bx<br />

pop bx<br />

pop es<br />

i*********************************************<br />

i****** install new illegal opcode handler<br />

i*********************************************<br />

push dx<br />

push bx<br />

push ds<br />

mov ax, 2506h<br />

mov dx, OFFSET - ill _op<br />

mov bx, cs<br />

mov ds, bx<br />

int 21h<br />

pop ds<br />

pop bx<br />

pop dx<br />

char save_ccrl, save_cf, save _ce, save_cdi<br />

i***************************************************** ********<br />

i****** Set SM4 and SMAC and SMI bit to allow SMM instructions<br />

i*************************************************************<br />

mov aI, Oclh<br />

out 22h, al<br />

in aI, 23h<br />

mov byte ptr [save_ccrl, al<br />

or aI, 86h<br />

mov ah, al<br />

mov aI, Oclh<br />

out 22h, al<br />

mov aI, ah<br />

out 23h, al<br />

i*********************************************<br />

i****** Setup non-zero SMM region<br />

i*********************************************<br />

mov aI, Ocfh<br />

out 22h, al<br />

in aI, 23h<br />

mov byte ptr [save_cf] , al<br />

mov aI, Ocfh<br />

out 22h, al<br />

mov aI, 1<br />

out 23h, al<br />

A-34<br />

Tl486 SMM Programmer's Guide

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

Saved successfully!

Ooh no, something went wrong!