pub struct RecursivePageTable<'a> { /* fields omitted */ }
A recursive page table is a last level page table with an entry mapped to the table itself.
This recursive mapping allows accessing all page tables in the hierarchy:
- To access the level 4 page table, we “loop“ (i.e. follow the recursively mapped entry) four
times.
- To access a level 3 page table, we “loop” three times and then use the level 4 index.
- To access a level 2 page table, we “loop” two times, then use the level 4 index, then the
level 3 index.
- To access a level 1 page table, we “loop” once, then use the level 4 index, then the
level 3 index, then the level 2 index.
This struct implements the Mapper
trait.
Creates a new RecursivePageTable from the passed level 4 PageTable.
The page table must be recursively mapped, that means:
- The page table must have one recursive entry, i.e. an entry that points to the table
itself.
- The reference must use that “loop”, i.e. be of the form
0o_xxx_xxx_xxx_xxx_0000
where xxx
is the recursive entry.
- The page table must be active, i.e. the CR3 register must contain its physical address.
Otherwise Err(NotRecursivelyMapped)
is returned.
Creates a new RecursivePageTable without performing any checks.
The recursive_index
parameter must be the index of the recursively mapped entry.
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.
Return the frame that the specified page is mapped to.
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.
Return the frame that the specified page is mapped to.
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.
Return the frame that the specified page is mapped to.
Maps the given frame to the virtual page with the same address. Read more
Formats the value using the given formatter. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static