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

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.

Methods

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

pub unsafe fn new(level_4_table: &'a mut PageTable, phys_offset: u64) -> Self[src]

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

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.

Trait Implementations

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

fn translate_addr(&self, addr: VirtAddr) -> Option<PhysAddr>[src]

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

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

unsafe fn identity_map<A>(
    &mut self,
    frame: PhysFrame<S>,
    flags: PageTableFlags,
    frame_allocator: &mut A
) -> Result<MapperFlush<S>, MapToError> where
    A: FrameAllocator<Size4KiB>,
    S: PageSize,
    Self: Mapper<S>, 
[src]

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

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

unsafe fn identity_map<A>(
    &mut self,
    frame: PhysFrame<S>,
    flags: PageTableFlags,
    frame_allocator: &mut A
) -> Result<MapperFlush<S>, MapToError> where
    A: FrameAllocator<Size4KiB>,
    S: PageSize,
    Self: Mapper<S>, 
[src]

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

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

unsafe fn identity_map<A>(
    &mut self,
    frame: PhysFrame<S>,
    flags: PageTableFlags,
    frame_allocator: &mut A
) -> Result<MapperFlush<S>, MapToError> where
    A: FrameAllocator<Size4KiB>,
    S: PageSize,
    Self: Mapper<S>, 
[src]

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

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

Auto Trait Implementations

impl<'a> Send for OffsetPageTable<'a>

impl<'a> Sync for OffsetPageTable<'a>

impl<'a> Unpin for OffsetPageTable<'a>

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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