/DragonOS/kernel/src/arch/x86_64/init/ |
H A D | mod.rs | 56 MMArch::phys_2_virt(PhysAddr::new(&GDT_Table as *const usize as usize)).unwrap(); in kernel_main() 58 MMArch::phys_2_virt(PhysAddr::new(&IDT_Table as *const usize as usize)).unwrap(); in kernel_main() 89 MMArch::phys_2_virt(PhysAddr::new(&GDT_Table as *const usize as usize)).unwrap(); in early_setup_arch() 91 MMArch::phys_2_virt(PhysAddr::new(&IDT_Table as *const usize as usize)).unwrap(); in early_setup_arch()
|
/DragonOS/kernel/src/driver/virtio/ |
H A D | virtio_impl.rs | 33 let virt = MMArch::phys_2_virt(paddr).unwrap(); in dma_alloc() 47 NonNull::new(MMArch::phys_2_virt(paddr).unwrap().data() as _).unwrap(), in dma_alloc() 87 NonNull::new((MMArch::phys_2_virt(PhysAddr::new(paddr))).unwrap().data() as _).unwrap() in mmio_phys_to_virt()
|
/DragonOS/kernel/src/driver/net/ |
H A D | dma.rs | 26 let virt = MMArch::phys_2_virt(paddr).unwrap(); in dma_alloc() 40 NonNull::new(MMArch::phys_2_virt(paddr).unwrap().data() as _).unwrap(), in dma_alloc()
|
/DragonOS/kernel/src/driver/disk/ahci/ |
H A D | hba.rs | 202 MMArch::phys_2_virt(PhysAddr::new(clb as usize)) in init() 217 MMArch::phys_2_virt(PhysAddr::new(fb as usize)) in init() 229 MMArch::phys_2_virt(PhysAddr::new(clb as usize)) in init() 240 MMArch::phys_2_virt(PhysAddr::new(*ctbas_value as usize)) in init()
|
H A D | ahcidisk.rs | 98 (MMArch::phys_2_virt(PhysAddr::new( in read_at() 132 (MMArch::phys_2_virt(PhysAddr::new(volatile_read!(cmdheader.ctba) as usize)) in read_at() 255 (MMArch::phys_2_virt(PhysAddr::new( in write_at() 296 (MMArch::phys_2_virt(PhysAddr::new(volatile_read!(cmdheader.ctba) as usize)) in write_at()
|
/DragonOS/kernel/src/arch/x86_64/init/pvh/ |
H A D | mod.rs | 45 MMArch::phys_2_virt(PhysAddr::new(START_INFO.get().cmdline_paddr as usize)) in init_kernel_cmdline() 73 MMArch::phys_2_virt(PhysAddr::new(start_info.memmap_paddr as usize)).unwrap() in early_init_memory_blocks()
|
/DragonOS/kernel/src/mm/ |
H A D | fault.rs | 321 let new_frame = MMArch::phys_2_virt(cow_page_phys).unwrap(); in do_cow_fault() 323 MMArch::phys_2_virt(cache_page.read_irqsave().phys_address()) in do_cow_fault() 478 (MMArch::phys_2_virt(paddr).unwrap().data() as *mut u8).copy_from_nonoverlapping( in do_wp_page() 479 MMArch::phys_2_virt(old_paddr).unwrap().data() as *mut u8, in do_wp_page() 501 (MMArch::phys_2_virt(paddr).unwrap().data() as *mut u8).copy_from_nonoverlapping( in do_wp_page() 502 MMArch::phys_2_virt(old_paddr).unwrap().data() as *mut u8, in do_wp_page() 666 MMArch::phys_2_virt(new_cache_page).unwrap().data() as *mut u8, in filemap_fault()
|
H A D | mm.h | 28 #define phys_2_virt(addr) \ macro
|
H A D | page.rs | 264 MMArch::phys_2_virt(page.read_irqsave().phys_addr) in page_writeback() 522 return Arch::phys_2_virt(self.phys).unwrap(); in virt() 619 let frame = MMArch::phys_2_virt(phys).unwrap(); in clone() 649 let frame = MMArch::phys_2_virt(phys).unwrap().data() as *mut u8; in clone() 651 MMArch::phys_2_virt(old_phys).unwrap().data() as *mut u8, in clone() 1131 let table_vaddr = Arch::phys_2_virt(table_paddr)?; in create() 1188 let vaddr = MMArch::phys_2_virt(phys).unwrap(); in map() 1244 MMArch::write_bytes(MMArch::phys_2_virt(frame).unwrap(), 0, MMArch::PAGE_SIZE); in map_phys() 1295 MMArch::phys_2_virt(phys).unwrap(), in map_huge_page() 1326 MMArch::write_bytes(MMArch::phys_2_virt(frame).unwrap(), 0, MMArch::PAGE_SIZE); in allocate_table() [all …]
|
H A D | no_init.rs | 121 let vaddr = MMA::phys_2_virt(address); in free()
|
H A D | mod.rs | 587 unsafe fn phys_2_virt(phys: PhysAddr) -> Option<VirtAddr> { in phys_2_virt() method
|
/DragonOS/kernel/src/mm/allocator/ |
H A D | bump.rs | 116 .translate(MMA::phys_2_virt(p.phys_address()).unwrap()) in ensure_early_mapping() 119 let vaddr = MMA::phys_2_virt(p.phys_address()).unwrap(); in ensure_early_mapping()
|
H A D | buddy.rs | 95 core::ptr::write_bytes(MMArch::phys_2_virt(*f)?.data() as *mut u8, 0, A::PAGE_SIZE); in new() 188 let entry_virt_addr = unsafe { A::phys_2_virt(Self::entry_addr(base_addr, j)) }; in entry_virt_addr() 196 let page_list = unsafe { A::read(A::phys_2_virt(addr).unwrap()) }; in read_page() 202 let virt_addr = unsafe { A::phys_2_virt(curr_page) }; in write_page() 523 A::phys_2_virt(new_page_list_addr) in buddy_free()
|
H A D | kernel_allocator.rs | 40 let virt_addr = unsafe { MMArch::phys_2_virt(phy_addr).ok_or(AllocError)? }; in alloc_in_buddy()
|
/DragonOS/kernel/src/arch/x86_64/mm/ |
H A D | mod.rs | 169 MMArch::phys_2_virt(PhysAddr::new(0)).unwrap().data() in init() 298 unsafe fn phys_2_virt(phys: PhysAddr) -> Option<VirtAddr> { in phys_2_virt() method 505 let vaddr = unsafe { MMArch::phys_2_virt(paddr) }.unwrap(); in allocator_init() 589 assert!(MMArch::phys_2_virt(paddr) in test_buddy() 599 let vaddr = unsafe { MMArch::phys_2_virt(paddr).unwrap() }; in test_buddy()
|
/DragonOS/kernel/src/arch/riscv64/mm/ |
H A D | init.rs | 110 let vaddr = unsafe { MMArch::phys_2_virt(paddr) }.unwrap(); in riscv_mm_init()
|
H A D | mod.rs | 216 unsafe fn phys_2_virt(phys: PhysAddr) -> Option<VirtAddr> { in phys_2_virt() method
|
/DragonOS/kernel/src/arch/x86_64/smp/ |
H A D | mod.rs | 271 MMArch::phys_2_virt(PhysAddr::new(&mut __APU_START_CR3 as *mut u64 as usize)).unwrap() in arch_init()
|
/DragonOS/kernel/src/perf/ |
H A D | bpf.rs | 248 let virt_addr = unsafe { MMArch::phys_2_virt(phy_addr) }.ok_or(SystemError::EFAULT)?; in do_mmap()
|
/DragonOS/kernel/src/arch/x86_64/kvm/vmx/ |
H A D | vcpu.rs | 479 let virtaddr = unsafe { MMArch::phys_2_virt(PhysAddr::new(segment_base as usize)).unwrap() }; in get_segment_base()
|
/DragonOS/kernel/src/arch/x86_64/interrupt/ |
H A D | entry.rs | 569 MMArch::phys_2_virt(PhysAddr::new(&IDT_Table as *const usize as usize)).unwrap(); in get_idt_entry()
|