Home
last modified time | relevance | path

Searched refs:phys_2_virt (Results 1 – 21 of 21) sorted by relevance

/DragonOS/kernel/src/arch/x86_64/init/
H A Dmod.rs56 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 Dvirtio_impl.rs33 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 Ddma.rs26 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 Dhba.rs202 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 Dahcidisk.rs98 (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 Dmod.rs45 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 Dfault.rs321 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 Dmm.h28 #define phys_2_virt(addr) \ macro
H A Dpage.rs264 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 Dno_init.rs121 let vaddr = MMA::phys_2_virt(address); in free()
H A Dmod.rs587 unsafe fn phys_2_virt(phys: PhysAddr) -> Option<VirtAddr> { in phys_2_virt() method
/DragonOS/kernel/src/mm/allocator/
H A Dbump.rs116 .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 Dbuddy.rs95 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 Dkernel_allocator.rs40 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 Dmod.rs169 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 Dinit.rs110 let vaddr = unsafe { MMArch::phys_2_virt(paddr) }.unwrap(); in riscv_mm_init()
H A Dmod.rs216 unsafe fn phys_2_virt(phys: PhysAddr) -> Option<VirtAddr> { in phys_2_virt() method
/DragonOS/kernel/src/arch/x86_64/smp/
H A Dmod.rs271 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 Dbpf.rs248 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 Dvcpu.rs479 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 Dentry.rs569 MMArch::phys_2_virt(PhysAddr::new(&IDT_Table as *const usize as usize)).unwrap(); in get_idt_entry()