Lines Matching refs:i
84 pub fn entry_base(&self, i: usize) -> Option<VirtAddr> { in entry_base()
85 if i < Arch::PAGE_ENTRY_NUM { in entry_base()
87 return Some(self.base.add(i << shift)); in entry_base()
94 pub unsafe fn entry_virt(&self, i: usize) -> Option<VirtAddr> { in entry_virt()
95 if i < Arch::PAGE_ENTRY_NUM { in entry_virt()
96 return Some(self.virt().add(i * Arch::PAGE_ENTRY_SIZE)); in entry_virt()
103 pub unsafe fn entry(&self, i: usize) -> Option<PageEntry<Arch>> { in entry()
104 let entry_virt = self.entry_virt(i)?; in entry()
109 pub unsafe fn set_entry(&self, i: usize, entry: PageEntry<Arch>) -> Option<()> { in set_entry()
110 let entry_virt = self.entry_virt(i)?; in set_entry()
121 pub fn entry_mapped(&self, i: usize) -> Option<bool> { in entry_mapped()
122 let etv = unsafe { self.entry_virt(i) }?; in entry_mapped()
622 let i = table.index_of(virt)?; in map_phys() localVariable
623 assert!(i < Arch::PAGE_ENTRY_NUM); in map_phys()
627 if table.entry_mapped(i)? == true { in map_phys()
633 table.set_entry(i, entry); in map_phys()
637 let next_table = table.next_level_table(i); in map_phys()
655 table.set_entry(i, PageEntry::new(frame, flags)); in map_phys()
658 table = table.next_level_table(i)?; in map_phys()
692 .visit(virt, |p1, i| { in remap()
693 let mut entry = p1.entry(i)?; in remap()
695 p1.set_entry(i, entry); in remap()
711 let entry: PageEntry<Arch> = self.visit(virt, |p1, i| unsafe { p1.entry(i) })??; in translate()
769 let i = table.index_of(virt)?; in visit() localVariable
771 return Some(f(&mut table, i)); in visit()
773 table = table.next_level_table(i)?; in visit()
799 let i = table.index_of(vaddr)?; in unmap_phys_inner() localVariable
803 let entry = table.entry(i)?; in unmap_phys_inner()
804 table.set_entry(i, PageEntry::from_usize(0)); in unmap_phys_inner()
808 let mut subtable = table.next_level_table(i)?; in unmap_phys_inner()
823 table.set_entry(i, PageEntry::from_usize(0)); in unmap_phys_inner()