Struct x86::segmentation::Descriptor [−][src]
Expand description
Entry for IDT, GDT or LDT. Provides size and location of a segment.
See Intel 3a, Section 3.4.5 “Segment Descriptors”, and Section 3.5.2
Fields
lower: u32
upper: u32
Implementations
Create a new segment, TSS or LDT descriptor by setting the three base and two limit fields.
Creates a new descriptor with selector and offset (for IDT Gate descriptors, e.g. Trap, Interrupts and Task gates)
Set the type of the descriptor (bits 8-11). Indicates the segment or gate type and specifies the kinds of access that can be made to the segment and the direction of growth. The interpretation of this field depends on whether the descriptor type flag specifies an application (code or data) descriptor or a system descriptor.
Specifies whether the segment descriptor is for a system segment (S flag is clear) or a code or data segment (S flag is set).
Specifies the privilege level of the segment. The DPL is used to control access to the segment.
Set Present bit. Indicates whether the segment is present in memory (set) or not present (clear). If this flag is clear, the processor generates a segment-not-present exception (#NP) when a segment selector that points to the segment descriptor is loaded into a segment register.
Set L In IA-32e mode, bit 21 of the second doubleword of the segment descriptor indicates whether a code segment contains native 64-bit code. A value of 1 indicates instructions in this code segment are executed in 64-bit mode. A value of 0 indicates the instructions in this code segment are executed in compatibility mode. If L-bit is set, then D-bit must be cleared.
Set D/B. Performs different functions depending on whether the segment descriptor is an executable code segment, an expand-down data segment, or a stack segment.
Trait Implementations
Returns the “default value” for a type. Read more