pub struct PhysMemRegion {
pub paddr: PhysAddr,
pub size: usize,
pub flags: MemRegionFlags,
pub name: &'static str,
}
Expand description
A physical memory region.
Fields§
§paddr: PhysAddr
The start physical address of the region.
size: usize
The size in bytes of the region.
flags: MemRegionFlags
The region flags, see MemRegionFlags
.
name: &'static str
The region name, used for identification.
Implementations§
Source§impl PhysMemRegion
impl PhysMemRegion
Sourcepub const fn new_ram(start: usize, size: usize, name: &'static str) -> Self
pub const fn new_ram(start: usize, size: usize, name: &'static str) -> Self
Creates a RAM region with default flags (readable, writable, and allocatable).
Sourcepub const fn new_mmio(start: usize, size: usize, name: &'static str) -> Self
pub const fn new_mmio(start: usize, size: usize, name: &'static str) -> Self
Creates a MMIO region with default flags (readable, writable, and device).
Sourcepub const fn new_reserved(start: usize, size: usize, name: &'static str) -> Self
pub const fn new_reserved(start: usize, size: usize, name: &'static str) -> Self
Creates a reserved memory region with default flags (readable, writable, and reserved).
Trait Implementations§
Source§impl Clone for PhysMemRegion
impl Clone for PhysMemRegion
Source§fn clone(&self) -> PhysMemRegion
fn clone(&self) -> PhysMemRegion
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PhysMemRegion
impl Debug for PhysMemRegion
impl Copy for PhysMemRegion
Auto Trait Implementations§
impl Freeze for PhysMemRegion
impl RefUnwindSafe for PhysMemRegion
impl Send for PhysMemRegion
impl Sync for PhysMemRegion
impl Unpin for PhysMemRegion
impl UnwindSafe for PhysMemRegion
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