User's Manual

PROTECTION
Gate
Descriptor
Fields
D1
+7
INTEL RESERVED'
pi
DPL
\01
TYPE
jx
X
Xl
WORD
COUNT....,
+5
+3
DESTINATION SELECTOR'5-2
IX
X
+1
DESTINATION OFFSET,s-a
IS
7
'Must
be
set to 0 for compatibility
with
80386
(X
is don't care)
+6
+4
+2
Name
Value
4
TYPE
5
6
7
P 0
1
DPL
0-3
WORD
COUNT
0-31
DESTINA-
16-bit
TION
selector
SELECTOR
DESTINA-
16-bit
TION
offset
OFFSET
Figure 7-10. Gate
Descriptor
Format
7.5.1.1 CALL GATES
Description
Call Gate.
Task Gate.
Interrupt Gate.
Trap Gate.
Descriptor Contents are
not valid.
Descriptor
Contents are
valid.
Descriptor Privilege
Level.
Number of words
to
copy
from
caller's
stack
to
called procedure's stack.
Only used with call gate.
Selector to the target code
segment
(Call, Interrupt or
Trap Gate).
Selector to the target task
state segment (Task
Gate).
Entry
point
within
the
target code segment.
G30108
Call gate descriptors are used
by
call and jump instructions
in
the same manner
as
a
code
segment
descriptor. The hardware automatically recognizes that the destination selector refers to a gate
descrip-
tor. Then,
the
operation of the instruction
is
expanded
as
determined by the contents of the call gate.
A jump instruction can access a call gate
only
if
the target code segment
is
at the same privilege level.
A call instruction uses a call gate for the same or more privileged access.
A call gate descriptor may reside
in
either the GDT or the LDT, but not
in
the IDT. Figure 7-10 gives
the complete layout of a call gate descriptor.
A call gate can
be
referred to by either the long
JMP
or
CALL instructions. From the viewpoint of
the program executing a
JMP
or
CALL instruction, the fact that the destination
was
reached via a
call gate and not directly from the destination address of the instruction
is
not apparent.
7-17