Struct Tss Copy item path Source pub struct Tss {
tss: UnsafeCell<TaskStateSegment>,
ist1: AlignedStack <8192>,
ist2: AlignedStack <8192>,
ist3: AlignedStack <8192>,
ist4: AlignedStack <8192>,
}Expand description Owns the TaskStateSegment and its four IST stacks; must not move after
Tss::init (the GDT descriptor points to it).
Create a new, uninitialized Tss; call Tss::init to populate it.
Build the TSS with RSP0 pointing to 0 and the predefined IST stacks
§ Safety
This method must be called exactly once before Tss::tss is called to avoid undefined
behavior and multiple mutable references.
Getter for Tss::tss, returns a reference
§ Safety
The caller must guarantee that there are no mutable references or pointers to self.tss
Setter for TSS.RSP0
§ Safety
The caller must guarantee the following:
That Tss::init has already been called
This method is only called on the CPU which owns this TSS
That no refs/ptrs from Tss::tss are held when this is called
new_rsp0 is a valid pointer to a valid, mapped kernel stack
Source § Safety: tss will only be written to by the owner CPU and will only be written to when
the CPU transitions from userspace to kernelspace, where no kernel code could’ve run before
Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
[From]<T> for U chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.