Struct riscv::paging::Rv32PageTableWith
source · [−]pub struct Rv32PageTableWith<'a, V: VirtualAddress + AddressL2, FL: MapperFlushable> { /* private fields */ }
Expand description
This struct is a two level page table with Mapper
trait implemented.
Implementations
sourceimpl<'a, V: VirtualAddress + AddressL2, FL: MapperFlushable> Rv32PageTableWith<'a, V, FL>
impl<'a, V: VirtualAddress + AddressL2, FL: MapperFlushable> Rv32PageTableWith<'a, V, FL>
pub fn new(table: &'a mut PageTableX32, linear_offset: usize) -> Self
Trait Implementations
sourceimpl<'a, V: VirtualAddress + AddressL2, FL: MapperFlushable> Mapper for Rv32PageTableWith<'a, V, FL>
impl<'a, V: VirtualAddress + AddressL2, FL: MapperFlushable> Mapper for Rv32PageTableWith<'a, V, FL>
type P = PhysAddrSv32
type V = V
type MapperFlush = FL
type Entry = PageTableEntryX32
sourcefn map_to(
&mut self,
page: <Self as MapperExt>::Page,
frame: <Self as MapperExt>::Frame,
flags: PageTableFlags,
allocator: &mut impl FrameAllocatorFor<<Self as Mapper>::P>
) -> Result<Self::MapperFlush, MapToError>
fn map_to(
&mut self,
page: <Self as MapperExt>::Page,
frame: <Self as MapperExt>::Frame,
flags: PageTableFlags,
allocator: &mut impl FrameAllocatorFor<<Self as Mapper>::P>
) -> Result<Self::MapperFlush, MapToError>
Creates a new mapping in the page table. Read more
sourcefn unmap(
&mut self,
page: <Self as MapperExt>::Page
) -> Result<(<Self as MapperExt>::Frame, Self::MapperFlush), UnmapError<<Self as Mapper>::P>>
fn unmap(
&mut self,
page: <Self as MapperExt>::Page
) -> Result<(<Self as MapperExt>::Frame, Self::MapperFlush), UnmapError<<Self as Mapper>::P>>
Removes a mapping from the page table and returns the frame that used to be mapped. Read more
sourcefn ref_entry(
&mut self,
page: <Self as MapperExt>::Page
) -> Result<&mut PageTableEntryX32, FlagUpdateError>
fn ref_entry(
&mut self,
page: <Self as MapperExt>::Page
) -> Result<&mut PageTableEntryX32, FlagUpdateError>
Get the reference of the specified page
entry
sourcefn update_flags(
&mut self,
page: PageWith<Self::V>,
flags: PageTableFlags
) -> Result<Self::MapperFlush, FlagUpdateError>
fn update_flags(
&mut self,
page: PageWith<Self::V>,
flags: PageTableFlags
) -> Result<Self::MapperFlush, FlagUpdateError>
Updates the flags of an existing mapping.
sourcefn translate_page(
&mut self,
page: PageWith<Self::V>
) -> Option<FrameWith<Self::P>>
fn translate_page(
&mut self,
page: PageWith<Self::V>
) -> Option<FrameWith<Self::P>>
Return the frame that the specified page is mapped to.
sourcefn identity_map(
&mut self,
frame: FrameWith<Self::P>,
flags: PageTableFlags,
allocator: &mut impl FrameAllocatorFor<<Self as Mapper>::P>
) -> Result<Self::MapperFlush, MapToError>
fn identity_map(
&mut self,
frame: FrameWith<Self::P>,
flags: PageTableFlags,
allocator: &mut impl FrameAllocatorFor<<Self as Mapper>::P>
) -> Result<Self::MapperFlush, MapToError>
Maps the given frame to the virtual page with the same address.
Auto Trait Implementations
impl<'a, V, FL> RefUnwindSafe for Rv32PageTableWith<'a, V, FL> where
FL: RefUnwindSafe,
V: RefUnwindSafe,
impl<'a, V, FL> Send for Rv32PageTableWith<'a, V, FL> where
FL: Send,
V: Send,
impl<'a, V, FL> Sync for Rv32PageTableWith<'a, V, FL> where
FL: Sync,
V: Sync,
impl<'a, V, FL> Unpin for Rv32PageTableWith<'a, V, FL> where
FL: Unpin,
V: Unpin,
impl<'a, V, FL> !UnwindSafe for Rv32PageTableWith<'a, V, FL>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more