Lines Matching refs:virt
79 pub unsafe fn virt(&self) -> VirtAddr { in virt() method
96 return Some(self.virt().add(i * Arch::PAGE_ENTRY_SIZE)); in entry_virt()
547 virt: VirtAddr, in map()
553 return self.map_phys(virt, phys, flags); in map()
559 virt: VirtAddr, in map_phys()
564 if !(virt.check_aligned(Arch::PAGE_SIZE) && phys.check_aligned(Arch::PAGE_SIZE)) { in map_phys()
567 virt, in map_phys()
572 let virt = VirtAddr::new(virt.data() & (!Arch::PAGE_NEGATIVE_MASK)); in map_phys() localVariable
580 let i = table.index_of(virt)?; in map_phys()
586 kwarn!("Page {:?} already mapped", virt); in map_phys()
592 return Some(PageFlush::new(virt)); in map_phys()
614 PageFlags::new_page_table(virt.kind() == PageTableKind::User); in map_phys()
635 let virt: VirtAddr = Arch::phys_2_virt(phys)?; in map_linearly() localVariable
636 return self.map_phys(virt, phys, flags).map(|flush| (virt, flush)); in map_linearly()
652 virt: VirtAddr, in remap()
656 .visit(virt, |p1, i| { in remap()
660 Some(PageFlush::new(virt)) in remap()
674 pub fn translate(&self, virt: VirtAddr) -> Option<(PhysAddr, PageFlags<Arch>)> { in translate()
675 let entry: PageEntry<Arch> = self.visit(virt, |p1, i| unsafe { p1.entry(i) })??; in translate()
692 pub unsafe fn unmap(&mut self, virt: VirtAddr, unmap_parents: bool) -> Option<PageFlush<Arch>> { in unmap()
693 let (paddr, _, flusher) = self.unmap_phys(virt, unmap_parents)?; in unmap()
710 virt: VirtAddr, in unmap_phys()
713 if !virt.check_aligned(Arch::PAGE_SIZE) { in unmap_phys()
714 kerror!("Try to unmap unaligned page: virt={:?}", virt); in unmap_phys()
719 return unmap_phys_inner(virt, &mut table, unmap_parents, self.allocator_mut()) in unmap_phys()
720 .map(|(paddr, flags)| (paddr, flags, PageFlush::<Arch>::new(virt))); in unmap_phys()
726 virt: VirtAddr, in visit()
732 let i = table.index_of(virt)?; in visit()
814 virt: VirtAddr, field
819 pub fn new(virt: VirtAddr) -> Self { in new()
821 virt, in new()
827 unsafe { Arch::invalidate_page(self.virt) }; in flush()