pub struct N3Transport {}Expand description
N3 MMU transport : thread migration between distinct address spaces.
Fields§
§frame_idx: usizeIndex in the static frame pool.
frame_phys: u64Physical address of the MigrationFrame page.
frame_virt: u64Virtual address of the MigrationFrame (same in both AS).
msg_buf: MsgBufferShared message buffer (kernel-allocated, mapped in both AS).
msg_buf_phys: u64Physical address of the message buffer.
handler_stack_top: u64Dedicated handler stack (1 page, kernel-allocated). After CR3 switch, dst_ctx.rsp points to the top of this stack with the handler address as the return address.
handler_stack_phys: u64Physical address of the handler stack.
sender_task_id: TaskIdSender task ID.
receiver_task_id: TaskIdReceiver task ID.
tier: N3TierN3 tier (b or c).
pcid_sender: u16Sender’s PCID (0 for N3c).
pcid_receiver: u16Receiver’s PCID (0 for N3c).
watchdog_timeout_cycles: u64Watchdog timeout in TSC cycles.
Implementations§
Source§impl N3Transport
impl N3Transport
Sourcepub fn new(
sender_task_id: TaskId,
receiver_task_id: TaskId,
) -> Result<Self, IpcError>
pub fn new( sender_task_id: TaskId, receiver_task_id: TaskId, ) -> Result<Self, IpcError>
Create a new N3 transport between sender and receiver tasks.
Allocates a MigrationFrame and a shared message buffer, maps them in both address spaces, and registers the endpoint with the watchdog.
Sourcepub(crate) fn frame(&self) -> &MigrationFrame
pub(crate) fn frame(&self) -> &MigrationFrame
Get a reference to the underlying MigrationFrame.
Sourcepub(crate) fn frame_ptr(&self) -> *mut MigrationFrame
pub(crate) fn frame_ptr(&self) -> *mut MigrationFrame
Get the raw pointer to the MigrationFrame (for ASM primitive).
Trait Implementations§
Source§impl Debug for N3Transport
impl Debug for N3Transport
Source§impl Drop for N3Transport
impl Drop for N3Transport
Source§impl IpcConsumer for N3Transport
impl IpcConsumer for N3Transport
Source§impl IpcProducer for N3Transport
impl IpcProducer for N3Transport
Source§impl IpcTransport for N3Transport
impl IpcTransport for N3Transport
Source§fn level(&self) -> TransportLevel
fn level(&self) -> TransportLevel
Source§fn capabilities(&self) -> TransportCapabilities
fn capabilities(&self) -> TransportCapabilities
impl Send for N3Transport
impl Sync for N3Transport
Auto Trait Implementations§
impl Freeze for N3Transport
impl RefUnwindSafe for N3Transport
impl Unpin for N3Transport
impl UnsafeUnpin for N3Transport
impl UnwindSafe for N3Transport
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> 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