Struct TaskStateSegment
#[repr(C, packed(4))]pub struct TaskStateSegment {
reserved_1: u32,
pub privilege_stack_table: [VirtAddr; 3],
reserved_2: u64,
pub interrupt_stack_table: [VirtAddr; 7],
reserved_3: u64,
reserved_4: u16,
pub iomap_base: u16,
}Expand description
In 64-bit mode the TSS holds information that is not directly related to the task-switch mechanism, but is used for stack switching when an interrupt or exception occurs.
Fields§
§reserved_1: u32§privilege_stack_table: [VirtAddr; 3]The full 64-bit canonical forms of the stack pointers (RSP) for privilege levels 0-2. The stack pointers used when a privilege level change occurs from a lower privilege level to a higher one.
reserved_2: u64§interrupt_stack_table: [VirtAddr; 7]The full 64-bit canonical forms of the interrupt stack table (IST) pointers. The stack pointers used when an entry in the Interrupt Descriptor Table has an IST value other than 0.
reserved_3: u64§reserved_4: u16§iomap_base: u16The 16-bit offset to the I/O permission bit map from the 64-bit TSS base. It must not
exceed 0xDFFF.
Implementations§
§impl TaskStateSegment
impl TaskStateSegment
pub const fn new() -> TaskStateSegment
pub const fn new() -> TaskStateSegment
Creates a new TSS with zeroed privilege and interrupt stack table and an empty I/O-Permission Bitmap.
As we always set the TSS segment limit to
size_of::<TaskStateSegment>() - 1, this means that iomap_base is
initialized to size_of::<TaskStateSegment>().
Trait Implementations§
§impl Clone for TaskStateSegment
impl Clone for TaskStateSegment
§fn clone(&self) -> TaskStateSegment
fn clone(&self) -> TaskStateSegment
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TaskStateSegment
§impl Debug for TaskStateSegment
impl Debug for TaskStateSegment
§impl Default for TaskStateSegment
impl Default for TaskStateSegment
§fn default() -> TaskStateSegment
fn default() -> TaskStateSegment
Auto Trait Implementations§
impl Freeze for TaskStateSegment
impl RefUnwindSafe for TaskStateSegment
impl Send for TaskStateSegment
impl Sync for TaskStateSegment
impl Unpin for TaskStateSegment
impl UnsafeUnpin for TaskStateSegment
impl UnwindSafe for TaskStateSegment
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more