#[repr(align(16))]pub struct GdtStruct { /* private fields */ }
Expand description
A wrapper of the Global Descriptor Table (GDT) with maximum 16 entries.
Implementations§
source§impl GdtStruct
impl GdtStruct
sourcepub const KCODE32_SELECTOR: SegmentSelector = _
pub const KCODE32_SELECTOR: SegmentSelector = _
Kernel code segment for 32-bit mode.
sourcepub const KCODE64_SELECTOR: SegmentSelector = _
pub const KCODE64_SELECTOR: SegmentSelector = _
Kernel code segment for 64-bit mode.
sourcepub const KDATA_SELECTOR: SegmentSelector = _
pub const KDATA_SELECTOR: SegmentSelector = _
Kernel data segment.
sourcepub const UCODE32_SELECTOR: SegmentSelector = _
pub const UCODE32_SELECTOR: SegmentSelector = _
User code segment for 32-bit mode.
sourcepub const UDATA_SELECTOR: SegmentSelector = _
pub const UDATA_SELECTOR: SegmentSelector = _
User data segment.
sourcepub const UCODE64_SELECTOR: SegmentSelector = _
pub const UCODE64_SELECTOR: SegmentSelector = _
User code segment for 64-bit mode.
sourcepub const TSS_SELECTOR: SegmentSelector = _
pub const TSS_SELECTOR: SegmentSelector = _
TSS segment.
sourcepub fn new(tss: &'static TaskStateSegment) -> Self
pub fn new(tss: &'static TaskStateSegment) -> Self
Constructs a new GDT struct that filled with the default segment descriptors, including the given TSS segment.
sourcepub fn pointer(&self) -> DescriptorTablePointer
pub fn pointer(&self) -> DescriptorTablePointer
Returns the GDT pointer (base and limit) that can be used in lgdt
instruction.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for GdtStruct
impl Send for GdtStruct
impl Sync for GdtStruct
impl Unpin for GdtStruct
impl UnwindSafe for GdtStruct
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more