pub struct PhysicalMemory;Expand description
physical memory operations
Implementations§
Source§impl PhysicalMemory
impl PhysicalMemory
Sourcepub fn read(physical_address: u64, buffer: &mut [u8]) -> KmResult<usize>
pub fn read(physical_address: u64, buffer: &mut [u8]) -> KmResult<usize>
read from physical address
Sourcepub fn write(physical_address: u64, buffer: &[u8]) -> KmResult<usize>
pub fn write(physical_address: u64, buffer: &[u8]) -> KmResult<usize>
write to physical address
Sourcepub fn get_physical_address(virtual_address: *const c_void) -> Option<u64>
pub fn get_physical_address(virtual_address: *const c_void) -> Option<u64>
get physical address for virtual address
Sourcepub fn is_address_valid(physical_address: u64) -> bool
pub fn is_address_valid(physical_address: u64) -> bool
check if physical address is valid
Auto Trait Implementations§
impl Freeze for PhysicalMemory
impl RefUnwindSafe for PhysicalMemory
impl Send for PhysicalMemory
impl Sync for PhysicalMemory
impl Unpin for PhysicalMemory
impl UnwindSafe for PhysicalMemory
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