Intel 253666-024US Computer Hardware User Manual


 
3-476 Vol. 2A INT n/INTO/INT 3—Call to Interrupt Procedure
INSTRUCTION SET REFERENCE, A-M
IF VM
= 1
THEN #GP(new code segment selector); FI;
IF code segment is conforming or code segment DPL
= CPL
THEN
GOTO INTRA-PRIVILEGE-LEVEL-INTERRUPT;
ELSE
#GP(CodeSegmentSelector + EXT);
(* PE
= 1, interrupt or trap gate, nonconforming
code segment, DPL > CPL *)
FI;
FI;
END;
INTER-PRIVILEGE-LEVEL-INTERRUPT:
(* PE
= 1, interrupt or trap gate, non-conforming code segment, DPL < CPL *)
(* Check segment selector and descriptor for stack of new privilege level in current TSS *)
IF current TSS is 32-bit TSS
THEN
TSSstackAddress (new code segment DPL 8) + 4;
IF (TSSstackAddress + 7) > TSS limit
THEN #TS(current TSS selector); FI;
NewSS TSSstackAddress + 4;
NewESP stack address;
ELSE
IF current TSS is 16-bit TSS
THEN(* TSS is 16-bit *)
TSSstackAddress (new code segment DPL 4) + 2
IF (TSSstackAddress + 4) > TSS limit
THEN #TS(current TSS selector); FI;
NewESP TSSstackAddress;
NewSS TSSstackAddress + 2;
ELSE (* TSS is 64-bit *)
NewESP TSS[RSP FOR NEW TARGET DPL];
NewSS 0;
FI;
FI;
IF segment selector is NULL
THEN #TS(EXT); FI;
IF segment selector index is not within its descriptor table limits
or segment selector's RPL
DPL of code segment,
THEN #TS(SS selector + EXT); FI;
IF (IA32_EFER.LMA = 0) (* Not IA-32e mode *)
Read segment descriptor for stack segment in GDT or LDT;
IF stack segment DPL
DPL of code segment,