pub struct OffsetMapper<'a, PhysToVirt> where
PhysToVirt: Fn(PhysAddr) -> VirtAddr, { /* fields omitted */ }
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 (hence the name of this type). Other mappings
between physical and virtual memory are possible too, as long as they can be calculated
as an PhysAddr
to VirtAddr
closure.
pub unsafe fn new( level_4_table: &'a mut PageTable, phys_to_virt: PhysToVirt ) -> Self | [src] |
Creates a new OffsetMapper
that uses the passed closure for converting virtual
to physical addresses.
This function is unsafe because the caller must guarantee that the passed phys_to_virt
closure is correct. Otherwise this function might break memory safety, e.g. by writing
to an illegal memory location.
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