pub struct OffsetPageTable<'a> { /* private fields */ }
Expand description

A Mapper implementation that requires that the complete physically memory is mapped at some offset in the virtual address space.

Implementations

Creates a new OffsetPageTable that uses the given offset for converting virtual to physical addresses.

The complete physical memory must be mapped in the virtual address space starting at address phys_offset. This means that for example physical address 0x5000 can be accessed through virtual address phys_offset + 0x5000. This mapping is required because the mapper needs to access page tables, which are not mapped into the virtual address space by default.

Safety

This function is unsafe because the caller must guarantee that the passed phys_offset is correct. Also, the passed level_4_table must point to the level 4 page table of a valid page table hierarchy. Otherwise this function might break memory safety, e.g. by writing to an illegal memory location.

Returns a mutable reference to the wrapped level 4 PageTable instance.

Trait Implementations

Remove all empty P1-P3 tables Read more

Remove all empty P1-P3 tables in a certain range Read more

Formats the value using the given formatter. Read more

Creates a new mapping in the page table. Read more

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

Updates the flags of an existing mapping. Read more

unsafe fn set_flags_p4_entry(
    &mut self,
    page: Page<Size1GiB>,
    flags: PageTableFlags
) -> Result<MapperFlushAll, FlagUpdateError>

Set the flags of an existing page level 4 table entry Read more

unsafe fn set_flags_p3_entry(
    &mut self,
    page: Page<Size1GiB>,
    flags: PageTableFlags
) -> Result<MapperFlushAll, FlagUpdateError>

Set the flags of an existing page table level 3 entry Read more

unsafe fn set_flags_p2_entry(
    &mut self,
    page: Page<Size1GiB>,
    flags: PageTableFlags
) -> Result<MapperFlushAll, FlagUpdateError>

Set the flags of an existing page table level 2 entry Read more

Return the frame that the specified page is mapped to. Read more

Creates a new mapping in the page table. Read more

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

Creates a new mapping in the page table. Read more

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

Updates the flags of an existing mapping. Read more

unsafe fn set_flags_p4_entry(
    &mut self,
    page: Page<Size2MiB>,
    flags: PageTableFlags
) -> Result<MapperFlushAll, FlagUpdateError>

Set the flags of an existing page level 4 table entry Read more

unsafe fn set_flags_p3_entry(
    &mut self,
    page: Page<Size2MiB>,
    flags: PageTableFlags
) -> Result<MapperFlushAll, FlagUpdateError>

Set the flags of an existing page table level 3 entry Read more

unsafe fn set_flags_p2_entry(
    &mut self,
    page: Page<Size2MiB>,
    flags: PageTableFlags
) -> Result<MapperFlushAll, FlagUpdateError>

Set the flags of an existing page table level 2 entry Read more

Return the frame that the specified page is mapped to. Read more

Creates a new mapping in the page table. Read more

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

Creates a new mapping in the page table. Read more

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

Updates the flags of an existing mapping. Read more

unsafe fn set_flags_p4_entry(
    &mut self,
    page: Page<Size4KiB>,
    flags: PageTableFlags
) -> Result<MapperFlushAll, FlagUpdateError>

Set the flags of an existing page level 4 table entry Read more

unsafe fn set_flags_p3_entry(
    &mut self,
    page: Page<Size4KiB>,
    flags: PageTableFlags
) -> Result<MapperFlushAll, FlagUpdateError>

Set the flags of an existing page table level 3 entry Read more

unsafe fn set_flags_p2_entry(
    &mut self,
    page: Page<Size4KiB>,
    flags: PageTableFlags
) -> Result<MapperFlushAll, FlagUpdateError>

Set the flags of an existing page table level 2 entry Read more

Return the frame that the specified page is mapped to. Read more

Creates a new mapping in the page table. Read more

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

Return the frame that the given virtual address is mapped to and the offset within that frame. Read more

Translates the given virtual address to the physical address that it maps to. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.