pub struct Vmm<'m, M: PhysMapper, A: FrameAlloc> {
    aspace: AddressSpace<'m, M>,
    alloc: &'m mut A,
}Expand description
Minimal kernel virtual memory manager.
Fields§
§aspace: AddressSpace<'m, M>§alloc: &'m mut AImplementations§
Source§impl<'m, M: PhysMapper, A: FrameAlloc> Vmm<'m, M, A>
 
impl<'m, M: PhysMapper, A: FrameAlloc> Vmm<'m, M, A>
Sourcepub unsafe fn from_current(mapper: &'m M, alloc: &'m mut A) -> Self
 
pub unsafe fn from_current(mapper: &'m M, alloc: &'m mut A) -> Self
§Safety
- Must run at CPL0 with paging enabled.
 - Assumes CR3 points at a valid PML4 frame.
 
Sourcepub fn map_region(
    &mut self,
    va: VirtualAddress,
    pa: PhysicalAddress,
    len: u64,
    nonleaf: VirtualMemoryPageBits,
    leaf: VirtualMemoryPageBits,
) -> Result<(), AddressSpaceMapRegionError>
 
pub fn map_region( &mut self, va: VirtualAddress, pa: PhysicalAddress, len: u64, nonleaf: VirtualMemoryPageBits, leaf: VirtualMemoryPageBits, ) -> Result<(), AddressSpaceMapRegionError>
§Errors
Allocation fails, e.g. due to OOM.
pub fn unmap_region(&mut self, va: VirtualAddress, len: u64)
pub fn query(&self, va: VirtualAddress) -> Option<PhysicalAddress>
Auto Trait Implementations§
impl<'m, M, A> Freeze for Vmm<'m, M, A>
impl<'m, M, A> RefUnwindSafe for Vmm<'m, M, A>where
    A: RefUnwindSafe,
    M: RefUnwindSafe,
impl<'m, M, A> Send for Vmm<'m, M, A>
impl<'m, M, A> Sync for Vmm<'m, M, A>
impl<'m, M, A> Unpin for Vmm<'m, M, A>
impl<'m, M, A> !UnwindSafe for Vmm<'m, M, A>
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