Intel 253668-032US Manuale Utente

Pagina di 806
7-10   Vol. 3
TASK MANAGEMENT
The LTR instruction loads a segment selector (source operand) into the task register 
that points to a TSS descriptor in the GDT. It then loads the invisible portion of the 
task register with information from the TSS descriptor. LTR is a privileged instruction 
that may be executed only when the CPL is 0. It’s used during system initialization to 
put an initial value in the task register. Afterwards, the contents of the task register 
are changed implicitly when a task switch occurs.
The STR (store task register) instruction stores the visible portion of the task register 
in a general-purpose register or memory. This instruction can be executed by code 
running at any privilege level in order to identify the currently running task. However, 
it is normally used only by operating system software.
On power up or reset of the processor, segment selector and base address are set to 
the default value of 0; the limit is set to FFFFH.
Figure 7-5.  Task Register
Segment Limit
Selector
+
GDT
TSS Descriptor
0
Base Address
Task
Invisible Part
Visible Part
TSS
Register