13.07.2015 Views

iAPX 286 Operating System Writers Guide 1983

iAPX 286 Operating System Writers Guide 1983

iAPX 286 Operating System Writers Guide 1983

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

USING HARDWARE PROTECTION FEATURESLocal Descriptor TableAn LDT contains the descriptors that are private to a task. Each task may have an LDT. The LDTkeeps the descriptors private to one task separate from those private to other tasks. A task cannotnormally gain access to the segments defined by another task. A local descriptor table may contain anyof the following types of descriptor:• Data segment• Executable segment• Call gate• Task gateThe executable segment and data segment descriptors in an LDT normally refer to segments privateto a task. Call gates and task gates in an LDT provide private entry points to other procedures andprograms.The processor uses a task's LDT automatically for certain addressing operations. The base address andlimit of the LDT segment of the executing task are kept in the LDT register. Only two operations areavailable to programmatically change the contents of the LDT register:• During a task switch operation, the processor loads the LDT register from the task state segment(TSS).• The LLDT instruction loads the LDT register directly. The LLDT instruction can be executed onlyat privilege level 0 (PL 0). Initialization procedures use LLDT to give the LDT register its initialvalue. Note that if you change the LDT register you must also change the LDT selector in the TSS(refer to Chapter 4). An operating system may need to change the LDT register temporarily to gainaccess to the address space of another task when passing information between tasks.You can use the SLDT instruction to read the contents of the LDT register. <strong>Operating</strong>-system proceduresthat operate on LDTs may usually be called from any task. These procedures may use the SLDTinstruction to find which LDT belongs to the current task. In PL/M-<strong>286</strong>, the built-in variableLOCAL$TABLE gives access to the LDT register.An LDT may contain up to 8,192 descriptors (the number of 8-byte descriptors that fit into a maximumsizedsegment of 65,536 bytes).Global Descriptor TableDescriptors that are shared among tasks reside in the GDT. There is only one GDT for the entiresystem. The GDT can contain any of the following types of descriptor:• Data segment• Executable segment• Task state segment• Local descriptor table segment• Call gate• Task gate2-14 121960-001

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!