#[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 more