Intel IA-32 Manuale Utente

Pagina di 636
Vol. 3A 6-7
TASK MANAGEMENT
6.2.2
TSS Descriptor
The TSS, like all other segments, is defined by a segment descriptor. Figure 6-3 shows the
format of a TSS descriptor. TSS descriptors may only be placed in the GDT; they cannot be
placed in an LDT or the IDT. 
An attempt to access a TSS using a segment selector with its TI flag set (which indicates the
current LDT) causes a general-protection exception (#GP) to be generated during CALLs and
JMPs; it causes an invalid TSS exception (#TS) during IRETs. A general-protection exception
is also generated if an attempt is made to load a segment selector for a TSS into a segment
register.
The busy flag (B) in the type field indicates whether the task is busy. A busy task is currently
running or suspended. A type field with a value of 1001B indicates an inactive task; a value of
1011B indicates a busy task. Tasks are not recursive. The processor uses the busy flag to detect
an attempt to call a task whose execution has been interrupted. To insure that there is only one
busy flag is associated with a task, each TSS should have only one TSS descriptor that points
to it.
Figure 6-3.  TSS Descriptor
31
24 23 22 21 20 19
16 15
13
14
12 11
8 7
0
P
Base 31:24
G
D
P
L
Type
0
0
31
16 15
0
Base Address 15:00
Segment Limit 15:00
Base 23:16
A
V
L
Limit
19:16
0
1
B
0
1
TSS Descriptor
AVL
B
BASE
DPL
G
Available for use by system software
Busy flag
Segment Base Address
Descriptor Privilege Level
Granularity
LIMIT
P
TYPE
Segment Limit
Segment Present
Segment Type
0
4