[][src]Trait mips::paging::Mapper

pub trait Mapper {
    fn map_to(
        &mut self,
        page: Page,
        frame: Frame,
        flags: PageTableFlags,
        allocator: &mut impl FrameAllocator
    ) -> Result<MapperFlush, MapToError>;
fn unmap(&mut self, page: Page) -> Result<(Frame, MapperFlush), UnmapError>;
fn ref_entry(
        &mut self,
        page: Page
    ) -> Result<&mut PageTableEntry, FlagUpdateError>; fn update_flags(
        &mut self,
        page: Page,
        flags: PageTableFlags
    ) -> Result<MapperFlush, FlagUpdateError> { ... }
fn translate_page(&mut self, page: Page) -> Option<Frame> { ... }
fn identity_map(
        &mut self,
        frame: Frame,
        flags: PageTableFlags,
        allocator: &mut impl FrameAllocator
    ) -> Result<MapperFlush, MapToError> { ... } }

Required methods

fn map_to(
    &mut self,
    page: Page,
    frame: Frame,
    flags: PageTableFlags,
    allocator: &mut impl FrameAllocator
) -> Result<MapperFlush, MapToError>

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.

fn unmap(&mut self, page: Page) -> Result<(Frame, MapperFlush), UnmapError>

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.

fn ref_entry(
    &mut self,
    page: Page
) -> Result<&mut PageTableEntry, FlagUpdateError>

Get the reference of the specified page entry

Loading content...

Provided methods

fn update_flags(
    &mut self,
    page: Page,
    flags: PageTableFlags
) -> Result<MapperFlush, FlagUpdateError>

Updates the flags of an existing mapping.

fn translate_page(&mut self, page: Page) -> Option<Frame>

Return the frame that the specified page is mapped to.

fn identity_map(
    &mut self,
    frame: Frame,
    flags: PageTableFlags,
    allocator: &mut impl FrameAllocator
) -> Result<MapperFlush, MapToError>

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

Loading content...

Implementors

impl<'a> Mapper for TwoLevelPageTable<'a>[src]

fn update_flags(
    &mut self,
    page: Page,
    flags: PageTableFlags
) -> Result<MapperFlush, FlagUpdateError>
[src]

fn translate_page(&mut self, page: Page) -> Option<Frame>[src]

fn identity_map(
    &mut self,
    frame: Frame,
    flags: PageTableFlags,
    allocator: &mut impl FrameAllocator
) -> Result<MapperFlush, MapToError>
[src]

Loading content...