#[repr(C, packed(4))]pub struct TaskStateSegment {
pub privilege_stack_table: [VirtAddr; 3],
pub interrupt_stack_table: [VirtAddr; 7],
pub iomap_base: u16,
/* private fields */
}
Expand description
In 64-bit mode the TSS holds information that is not directly related to the task-switch mechanism, but is used for finding kernel level stack if interrupts arrive while in kernel mode.
Fields§
§privilege_stack_table: [VirtAddr; 3]
The full 64-bit canonical forms of the stack pointers (RSP) for privilege levels 0-2.
interrupt_stack_table: [VirtAddr; 7]
The full 64-bit canonical forms of the interrupt stack table (IST) pointers.
iomap_base: u16
The 16-bit offset to the I/O permission bit map from the 64-bit TSS base.
Implementations§
Source§impl TaskStateSegment
impl TaskStateSegment
Sourcepub 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§
Source§impl Clone for TaskStateSegment
impl Clone for TaskStateSegment
Source§fn clone(&self) -> TaskStateSegment
fn clone(&self) -> TaskStateSegment
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TaskStateSegment
impl Debug for TaskStateSegment
impl Copy for 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 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
Mutably borrows from an owned value. Read more