Skip to main content

CommandFrame

Struct CommandFrame 

pub struct CommandFrame {
    pub extended_regs: ExtendedRegs,
    pub gpregs: GpRegs,
    pub restore_extended_registers: u64,
    pub save_extended_registers: u64,
    pub memory_mappings: MemoryMappings,
    pub debug_regs: DebugRegs,
    /* private fields */
}
Expand description

The command frame is structured such that important values will be nicely aligned.

The extended register data is at the front, which means it will be aligned on a page bound. The GpRegs are aligned on a 1024-byte boundary. Memory mappings and other configuration follow after that. ! NOTE: Do not modify the field order without benchmarking! Ordering the fields incorrectly can easily cost ~5-10% performance.

Fields§

§extended_regs: ExtendedRegs

Data for the extended registers (3072 bytes)

§gpregs: GpRegs

The basic general-purpose registers (184 bytes)

§restore_extended_registers: u64

The bitmask of extended registers that should be set (8 bytes)

§save_extended_registers: u64

The bitmask of extended registers that should be copied back into extended_register_data (8 bytes)

§memory_mappings: MemoryMappings

The memory mappings (780 bytes)

§debug_regs: DebugRegs

The debugging registers DR0-DR3, DR6 & DR7 (48 bytes)

Implementations§

§

impl CommandFrame

pub fn new( gpregs: GpRegs, memory_mappings: impl Iterator<Item = MemoryMapping>, ) -> CommandFrame

Trait Implementations§

§

impl Default for CommandFrame

§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.