Struct PhysMemRegion
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§
§impl PhysMemRegion
impl PhysMemRegion
pub const fn new_ram(
start: usize,
size: usize,
name: &'static str,
) -> PhysMemRegion
pub const fn new_ram( start: usize, size: usize, name: &'static str, ) -> PhysMemRegion
Creates a RAM region with default flags (readable, writable, and allocatable).
pub const fn new_mmio(
start: usize,
size: usize,
name: &'static str,
) -> PhysMemRegion
pub const fn new_mmio( start: usize, size: usize, name: &'static str, ) -> PhysMemRegion
Creates a MMIO region with default flags (readable, writable, and device).
pub const fn new_reserved(
start: usize,
size: usize,
name: &'static str,
) -> PhysMemRegion
pub const fn new_reserved( start: usize, size: usize, name: &'static str, ) -> PhysMemRegion
Creates a reserved memory region with default flags (readable, writable, and reserved).
Trait Implementations§
§impl Clone for PhysMemRegion
impl Clone for PhysMemRegion
§fn clone(&self) -> PhysMemRegion
fn clone(&self) -> PhysMemRegion
Returns a copy 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 more§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