pub struct FakeBtiPinnedVmos { /* private fields */ }Expand description
A collection of pinned VMOs returned by FakeBti::get_pinned_vmo.
Implementations§
Source§impl FakeBtiPinnedVmos
impl FakeBtiPinnedVmos
Sourcepub fn find_phys(
&self,
physical_address: usize,
) -> Option<(Arc<Vmo>, Range<u64>)>
pub fn find_phys( &self, physical_address: usize, ) -> Option<(Arc<Vmo>, Range<u64>)>
Looks up a physical address in the pinned VMOs.
Returns the VMO and the range of offsets within that VMO starting at the offset
corresponding to physical_address and ending at the end of the contiguous pinned block.
Sourcepub fn read_bytes(&self, phys_addr: usize, len: usize) -> Result<Vec<u8>, Error>
pub fn read_bytes(&self, phys_addr: usize, len: usize) -> Result<Vec<u8>, Error>
Reads bytes from physical memory.
The read can span across multiple non-contiguous pinned ranges.
Sourcepub fn read<T: FromBytes>(&self, phys_addr: usize) -> Result<T, Error>
pub fn read<T: FromBytes>(&self, phys_addr: usize) -> Result<T, Error>
Reads T from physical memory.
Auto Trait Implementations§
impl Freeze for FakeBtiPinnedVmos
impl RefUnwindSafe for FakeBtiPinnedVmos
impl Send for FakeBtiPinnedVmos
impl Sync for FakeBtiPinnedVmos
impl Unpin for FakeBtiPinnedVmos
impl UnsafeUnpin for FakeBtiPinnedVmos
impl UnwindSafe for FakeBtiPinnedVmos
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