Intel 253666-024US Computer Hardware User Manual


 
3-98 Vol. 2A CALL—Call Procedure
INSTRUCTION SET REFERENCE, A-M
THEN #GP(code segment selector); FI;
Read code segment descriptor;
IF code-segment segment descriptor does not indicate a code segment
or code-segment segment descriptor DPL > CPL
THEN #GP(code segment selector); FI;
IF IA32_EFER.LMA = 1 AND (code-segment segment descriptor is
not a 64-bit code segment or code-segment descriptor has both L-Bit and D-bit set)
THEN #GP(code segment selector); FI;
IF code segment not present
THEN #NP(new code segment selector); FI;
IF code segment is non-conforming and DPL < CPL
THEN go to MORE-PRIVILEGE;
ELSE go to SAME-PRIVILEGE;
FI;
END;
MORE-PRIVILEGE:
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
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 *)
TSSstackAddress new code segment (DPL 8) + 4;
IF (TSSstackAddress + 8) > TSS limit
THEN #TS(current TSS selector); FI;
newESP TSSstackAddress;
newSS NULL;
FI;
FI;
IF IA32_EFER.LMA = 0 and stack segment selector = NULL
THEN #TS(stack segment selector); FI;
Read code segment descriptor;
IF IA32_EFER.LMA = 0 and (stack segment selector's RPL
DPL of code segment