GATE and Gate Descriptor Format
Gate specifies an exactly defined point of re-entry point into a more highly privileged routine.
Gate descriptor format
The fields P (“Praesenz”bit) and DPL (“Descriptor Privilege level”) possess the same function as the appropriate fields of a segment descriptor. If the p-bit is set, the described segment (and/or the subroutine described by the gate) is momentarily in the memory. The DPL limits the access to the descriptor by programs (and/or tasks). That access is permitted only if the DPL of the descriptor numerically larger or equal the Current Privilege level is (“CPL “= DPL of the current code segment), i.e., which must appropriate gate a smaller or the same privilege stage as its Aufrufer to possess. If that is not the case, the processor reacts with the attempt to use the gate with an exception.
As was mentioned already further above, the neglected “Segment” bit marks the descriptor as system segment descriptor. Over 4 bits the long type field can be differentiated then between gate descriptors and special system descriptors. Further the value of the type field over decides whether it concerns with the respective descriptor a 80286 or 80386 gate descriptor. For example the 80286 the fourth word of the descriptor (offset address, bit 16,,31) does not use, since 16 bits an offset address is sufficient due to the restriction 80286 on only 24 address lines.
Table gives an overview of all possible system segment types. All grey colored descriptor types belong to the group of the special system segments, it become under point: 3 special Protected mode functions more near regards.
|4||0100b||80286 call gate|
|6||0110b||80286 interrupts gate|
|7||0111b||80286 Trap gate|
|12||1100b||80386 call gate|
|14||1110b||80386 interrupts gate|
|15||1111b||80386 Trap gate|
Table : possible system segment types
|The following structure represents a gate descriptor:
gate_deskriptor: dw 0200h; Offset, bit 0,,15 dw 8; Code segment lector railways 0; not used railways 10101111b; "Praesenz" bits, DPL and segment type dw 0; Offset, bit 16..31
Which type of gate descriptor does it concern and which destination address defines itself?
The described destination address (the address of the subroutine) results from first the two, as well as the fourth word to the Selektor:Offset pair 8:00000200h.
From the value of the byte with high order of the third word (10101111b) results: