Trait kernel_hal::PageTableTrait[][src]

pub trait PageTableTrait: Sync + Send {
    fn map(
        &mut self,
        _vaddr: VirtAddr,
        _paddr: PhysAddr,
        _flags: MMUFlags
    ) -> Result<()>;
fn unmap(&mut self, _vaddr: VirtAddr) -> Result<()>;
fn protect(&mut self, _vaddr: VirtAddr, _flags: MMUFlags) -> Result<()>;
fn query(&mut self, _vaddr: VirtAddr) -> Result<PhysAddr>;
fn table_phys(&self) -> PhysAddr; fn map_many(
        &mut self,
        vaddr: VirtAddr,
        paddrs: &[PhysAddr],
        flags: MMUFlags
    ) -> Result<()> { ... }
fn map_cont(
        &mut self,
        vaddr: VirtAddr,
        paddr: PhysAddr,
        pages: usize,
        flags: MMUFlags
    ) -> Result<()> { ... }
fn unmap_cont(&mut self, vaddr: VirtAddr, pages: usize) -> Result<()> { ... } }

Required methods

fn map(
    &mut self,
    _vaddr: VirtAddr,
    _paddr: PhysAddr,
    _flags: MMUFlags
) -> Result<()>
[src]

Map the page of vaddr to the frame of paddr with flags.

fn unmap(&mut self, _vaddr: VirtAddr) -> Result<()>[src]

Unmap the page of vaddr.

fn protect(&mut self, _vaddr: VirtAddr, _flags: MMUFlags) -> Result<()>[src]

Change the flags of the page of vaddr.

fn query(&mut self, _vaddr: VirtAddr) -> Result<PhysAddr>[src]

Query the physical address which the page of vaddr maps to.

fn table_phys(&self) -> PhysAddr[src]

Get the physical address of root page table.

Loading content...

Provided methods

fn map_many(
    &mut self,
    vaddr: VirtAddr,
    paddrs: &[PhysAddr],
    flags: MMUFlags
) -> Result<()>
[src]

fn map_cont(
    &mut self,
    vaddr: VirtAddr,
    paddr: PhysAddr,
    pages: usize,
    flags: MMUFlags
) -> Result<()>
[src]

fn unmap_cont(&mut self, vaddr: VirtAddr, pages: usize) -> Result<()>[src]

Loading content...

Implementors

impl PageTableTrait for PageTable[src]

#[export_name = "hal_pt_map"]fn map(
    &mut self,
    _vaddr: VirtAddr,
    _paddr: PhysAddr,
    _flags: MMUFlags
) -> Result<()>
[src]

Map the page of vaddr to the frame of paddr with flags.

#[export_name = "hal_pt_unmap"]fn unmap(&mut self, _vaddr: VirtAddr) -> Result<()>[src]

Unmap the page of vaddr.

#[export_name = "hal_pt_protect"]fn protect(&mut self, _vaddr: VirtAddr, _flags: MMUFlags) -> Result<()>[src]

Change the flags of the page of vaddr.

#[export_name = "hal_pt_query"]fn query(&mut self, _vaddr: VirtAddr) -> Result<PhysAddr>[src]

Query the physical address which the page of vaddr maps to.

#[export_name = "hal_pt_table_phys"]fn table_phys(&self) -> PhysAddr[src]

Get the physical address of root page table.

Loading content...