pub struct MemoryRegion {
pub name: String,
pub size: u64,
pub region_type: RegionType,
pub priority: i32,
pub subregions: Vec<SubRegion>,
pub enabled: bool,
}Fields§
§name: String§size: u64§region_type: RegionType§priority: i32§subregions: Vec<SubRegion>§enabled: boolImplementations§
Source§impl MemoryRegion
impl MemoryRegion
Sourcepub fn ram(name: &str, size: u64) -> (Self, Arc<RamBlock>)
pub fn ram(name: &str, size: u64) -> (Self, Arc<RamBlock>)
Create a RAM-backed region and return the shared
RamBlock handle alongside it.
Sourcepub fn rom(name: &str, size: u64) -> (Self, Arc<RamBlock>)
pub fn rom(name: &str, size: u64) -> (Self, Arc<RamBlock>)
Create a read-only ROM region and return the shared
RamBlock handle alongside it. Writes to ROM are
silently dropped.
Sourcepub fn io(name: &str, size: u64, ops: Box<dyn MmioOps>) -> Self
pub fn io(name: &str, size: u64, ops: Box<dyn MmioOps>) -> Self
Create an MMIO region backed by device callbacks.
Sourcepub fn alias(name: &str, target: MemoryRegion, offset: u64, size: u64) -> Self
pub fn alias(name: &str, target: MemoryRegion, offset: u64, size: u64) -> Self
Create an alias window into target starting at byte
offset within the target region.
Sourcepub fn add_subregion(&mut self, region: MemoryRegion, offset: GPA)
pub fn add_subregion(&mut self, region: MemoryRegion, offset: GPA)
Add a child region at offset within this region’s
address space, using the child’s existing priority.
Sourcepub fn add_subregion_with_priority(
&mut self,
region: MemoryRegion,
offset: GPA,
priority: i32,
)
pub fn add_subregion_with_priority( &mut self, region: MemoryRegion, offset: GPA, priority: i32, )
Add a child region at offset, overriding its priority.
Auto Trait Implementations§
impl Freeze for MemoryRegion
impl RefUnwindSafe for MemoryRegion
impl Send for MemoryRegion
impl Sync for MemoryRegion
impl Unpin for MemoryRegion
impl UnsafeUnpin for MemoryRegion
impl UnwindSafe for MemoryRegion
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
Mutably borrows from an owned value. Read more