Struct tartan_arch::x86_64::protection::TaskStateSegmentHeader
source · #[repr(C, packed(16))]pub struct TaskStateSegmentHeader {
pub privileged_stack: [u64; 3],
pub interrupt_stack: [u64; 7],
pub io_permission_map_offset: u16,
/* private fields */
}
Expand description
Stack and I/O permission map pointers that make up the most significant part of a task state segment (TSS).
Since 64-bit mode does not support task switching, the name is a historical artifact, and this does not store any real task state.
Fields§
§privileged_stack: [u64; 3]
Stack pointers to use when switching to privilege levels 0–2.
interrupt_stack: [u64; 7]
Stack pointers available for use when handling interrupts. The specific entry
used is determined by the
interrupt_stack_index
field of
the relevant interrupt gate descriptor.
io_permission_map_offset: u16
Offset from the start of this structure to start of the IOPermissionBitmap
.
The I/O permission map ends at the limit of the containing segment, and must be at least two bytes. If this offset is equal to or greater than the limit, then the permission map is empty and all ports are assumed to be zero.
Not modified by the processor on a task switch.
Implementations§
source§impl TaskStateSegmentHeader
impl TaskStateSegmentHeader
sourcepub const fn new() -> Self
pub const fn new() -> Self
Create a header with zero-initialized stack pointers and an
io_permission_map_offset
that points directly
after the header.
Trait Implementations§
source§impl Clone for TaskStateSegmentHeader
impl Clone for TaskStateSegmentHeader
source§fn clone(&self) -> TaskStateSegmentHeader
fn clone(&self) -> TaskStateSegmentHeader
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TaskStateSegmentHeader
impl Debug for TaskStateSegmentHeader
source§impl Default for TaskStateSegmentHeader
impl Default for TaskStateSegmentHeader
source§impl PartialEq for TaskStateSegmentHeader
impl PartialEq for TaskStateSegmentHeader
impl Copy for TaskStateSegmentHeader
impl Eq for TaskStateSegmentHeader
impl StructuralPartialEq for TaskStateSegmentHeader
Auto Trait Implementations§
impl Freeze for TaskStateSegmentHeader
impl RefUnwindSafe for TaskStateSegmentHeader
impl Send for TaskStateSegmentHeader
impl Sync for TaskStateSegmentHeader
impl Unpin for TaskStateSegmentHeader
impl UnwindSafe for TaskStateSegmentHeader
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)