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

pub struct OffsetPageTable<'a> { /* fields omitted */ }

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


impl<'a> OffsetPageTable<'a>[src]

pub unsafe fn new(
    level_4_table: &'a mut PageTable,
    phys_offset: VirtAddr
) -> Self

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.


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.

pub fn level_4_table(&mut self) -> &mut PageTable[src]

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

Trait Implementations

impl<'a> Debug for OffsetPageTable<'a>[src]

impl<'a> Mapper<Size1GiB> for OffsetPageTable<'a>[src]

impl<'a> Mapper<Size2MiB> for OffsetPageTable<'a>[src]

impl<'a> Mapper<Size4KiB> for OffsetPageTable<'a>[src]

impl<'a> Translate for OffsetPageTable<'a>[src]

Auto Trait Implementations

impl<'a> Send for OffsetPageTable<'a>[src]

impl<'a> Sync for OffsetPageTable<'a>[src]

impl<'a> Unpin for OffsetPageTable<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> MapperAllSizes for T where
    T: Mapper<Size4KiB> + Mapper<Size2MiB> + Mapper<Size1GiB>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.