Lines Matching refs:vaddr
29 pub unsafe extern "C" fn rs_pseudo_map_phys(vaddr: usize, paddr: usize, size: usize) { in rs_pseudo_map_phys()
30 let vaddr = VirtAddr::new(vaddr); in rs_pseudo_map_phys() localVariable
33 pseudo_map_phys(vaddr, paddr, count); in rs_pseudo_map_phys()
38 pub unsafe extern "C" fn rs_map_phys(vaddr: usize, paddr: usize, size: usize, flags: usize) { in rs_map_phys()
39 let mut vaddr = VirtAddr::new(vaddr); in rs_map_phys() localVariable
56 .map_phys(vaddr, paddr, page_flags) in rs_map_phys()
61 vaddr += MMArch::PAGE_SIZE; in rs_map_phys()
93 let vaddr = VirtAddr::new(ptr as usize); in do_kmalloc() localVariable
97 if unlikely(guard.contains_key(&vaddr)) { in do_kmalloc()
100 drop(Vec::from_raw_parts(vaddr.data() as *mut u8, len, cap)); in do_kmalloc()
104 vaddr in do_kmalloc()
108 guard.insert(vaddr, (vaddr, len, cap)); in do_kmalloc()
109 return vaddr.data(); in do_kmalloc()
116 pub unsafe extern "C" fn kfree(vaddr: usize) -> usize { in kfree()
117 let vaddr = VirtAddr::new(vaddr); in kfree() localVariable
119 let p = guard.remove(&vaddr); in kfree()
123 kerror!("kfree: vaddr {:?} not found in C Allocation Map", vaddr); in kfree()
126 let (vaddr, len, cap) = p.unwrap(); in kfree()
127 drop(Vec::from_raw_parts(vaddr.data() as *mut u8, len, cap)); in kfree()