Struct x86_64::structures::paging::mapper::MappedPageTable[][src]

pub struct MappedPageTable<'a, P: PageTableFrameMapping> { /* fields omitted */ }
Expand description

A Mapper implementation that relies on a PhysAddr to VirtAddr conversion function.

This type requires that the all physical page table frames are mapped to some virtual address. Normally, this is done by mapping the complete physical address space into the virtual address space at some offset. Other mappings between physical and virtual memory are possible too, as long as they can be calculated as an PhysAddr to VirtAddr closure.

Implementations

Creates a new MappedPageTable that uses the passed closure for converting virtual to physical addresses.

Safety

This function is unsafe because the caller must guarantee that the passed page_table_frame_mapping closure 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.