[−][src]Trait mips::paging::Mapper
Required methods
fn map_to(
&mut self,
page: Page,
frame: Frame,
flags: PageTableFlags,
allocator: &mut impl FrameAllocator
) -> Result<MapperFlush, MapToError>
&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>
&mut self,
page: Page
) -> Result<&mut PageTableEntry, FlagUpdateError>
Get the reference of the specified page
entry
Provided methods
fn update_flags(
&mut self,
page: Page,
flags: PageTableFlags
) -> Result<MapperFlush, FlagUpdateError>
&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>
&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.
Implementors
impl<'a> Mapper for TwoLevelPageTable<'a>
[src]
fn map_to(
&mut self,
page: Page,
frame: Frame,
flags: PageTableFlags,
allocator: &mut impl FrameAllocator
) -> Result<MapperFlush, MapToError>
[src]
&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>
[src]
fn ref_entry(
&mut self,
page: Page
) -> Result<&mut PageTableEntry, FlagUpdateError>
[src]
&mut self,
page: Page
) -> Result<&mut PageTableEntry, FlagUpdateError>
fn update_flags(
&mut self,
page: Page,
flags: PageTableFlags
) -> Result<MapperFlush, FlagUpdateError>
[src]
&mut self,
page: Page,
flags: PageTableFlags
) -> Result<MapperFlush, FlagUpdateError>
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]
&mut self,
frame: Frame,
flags: PageTableFlags,
allocator: &mut impl FrameAllocator
) -> Result<MapperFlush, MapToError>