Module segmentation

Source
Expand description

Functionality to manipulate segment registers, build segement descriptors and selectors.

Re-exports§

pub use crate::current::segmentation::load_cs;

Structs§

Descriptor
Entry for IDT, GDT or LDT. Provides size and location of a segment.
DescriptorBuilder
Makes building descriptors easier (hopefully).
SegmentSelector
Specifies which element to load into a segment from descriptor tables (i.e., is a index to LDT or GDT table with some additional flags).

Enums§

CodeSegmentType
Code Segment types for descriptors. See also Intel 3a, Table 3-1 Code- and Data-Segment Types.
DataSegmentType
Data Segment types for descriptors. See also Intel 3a, Table 3-1 Code- and Data-Segment Types.
SystemDescriptorTypes32
System-Segment and Gate-Descriptor Types 32-bit mode. See also Intel 3a, Table 3-2 System Segment and Gate-Descriptor Types.
SystemDescriptorTypes64
System-Segment and Gate-Descriptor Types 64-bit mode See also Intel 3a, Table 3-2 System Segment and Gate-Descriptor Types.

Traits§

BuildDescriptor
GateDescriptorBuilder
Trait that defines the architecture specific functions for building various system segment descriptors which are available on all 16, 32, and 64 bits.
LdtDescriptorBuilder
Trait to define functions that build an architecture specific ldt descriptor. There is no corresponding ldt descriptor type for 16 bit.
SegmentDescriptorBuilder
Trait to define functions that build architecture specific code and data descriptors.
TaskGateDescriptorBuilder
Trait to implement for building a task-gate (this descriptor is not implemented for 64-bit systems since Hardware task switches are not supported in IA-32e mode.).

Functions§

cs
Returns the current value of the code segment register.
ds
Returns the current value of the data segment register.
es
Returns the current value of the extra segment register.
fs
Returns the current value of the FS segment register.
gs
Returns the current value of the GS segment register.
load_ds
Reload data segment register.
load_es
Reload es segment register.
load_fs
Reload fs segment register.
load_gs
Reload gs segment register.
load_ss
Reload stack segment register.
ss
Returns the current value of the stack segment register.