Trait x86_64::structures::paging::Mapper[][src]

pub trait Mapper<S: PageSize> {
    fn map_to<A>(
        &mut self,
        page: Page<S>,
        frame: PhysFrame<S>,
        flags: PageTableFlags,
        allocator: &mut A
    ) -> Result<MapperFlush<S>, MapToError>
    where
        A: FrameAllocator<Size4KiB>
;
fn unmap(
        &mut self,
        page: Page<S>
    ) -> Result<(PhysFrame<S>, MapperFlush<S>), UnmapError>;
fn update_flags(
        &mut self,
        page: Page<S>,
        flags: PageTableFlags
    ) -> Result<MapperFlush<S>, FlagUpdateError>;
fn translate_page(&self, page: Page<S>) -> Option<PhysFrame<S>>; fn identity_map<A>(
        &mut self,
        frame: PhysFrame<S>,
        flags: PageTableFlags,
        allocator: &mut A
    ) -> Result<MapperFlush<S>, MapToError>
    where
        A: FrameAllocator<Size4KiB>,
        S: PageSize,
        Self: Mapper<S>
, { ... } }

A trait for common page table operations.

Required Methods

Creates a new mapping in the page table.

This function might need additional physical frames to create new page tables. These frames are allocated from the allocator argument. At most three frames are required.

Removes a mapping from the page table and returns the frame that used to be mapped.

Note that no page tables or pages are deallocated.

Updates the flags of an existing mapping.

Return the frame that the specified page is mapped to.

Provided Methods

Maps the given frame to the virtual page with the same address.

Implementors