Home
last modified time | relevance | path

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

/DragonOS-0.1.8/kernel/src/exception/
Dgate.h105 …*(unsigned long *)(phys_2_virt(GDT_Table + n)) = (limit & 0xffff) | (((unsigned long)addr & 0xffff… in set_tss_descriptor()
106 …*(unsigned long *)(phys_2_virt(GDT_Table + n + 1)) = (((unsigned long)addr >> 32) & 0xffffffff) | … in set_tss_descriptor()
129 _set_gate(phys_2_virt(IDT_Table + n), 0x8E, ist, addr); // p=1,DPL=0, type=E in set_intr_gate()
146 _set_gate(phys_2_virt(IDT_Table + n), 0x8F, ist, addr); // p=1,DPL=0, type=F in set_trap_gate()
161 _set_gate(phys_2_virt(IDT_Table + n), 0xEF, ist, addr); // p=1,DPL=3, type=F in set_system_trap_gate()
167 _set_gate(phys_2_virt(IDT_Table + n) , 0xEE , ist , addr); //P,DPL=3,TYPE=E in set_system_intr_gate()
/DragonOS-0.1.8/kernel/src/
Dmain.c52 gdtp.gdt_vaddr = (ul)phys_2_virt((ul)&GDT_Table); in reload_gdt()
62 idtp.idt_vaddr = (ul)phys_2_virt((ul)&IDT_Table); in reload_idt()
79 ul tss_item_addr = (ul)phys_2_virt(0x7c00); in system_initialize()
/DragonOS-0.1.8/kernel/src/driver/disk/ahci/
Dhba.rs6 use crate::mm::phys_2_virt;
204 ptr::write_bytes(phys_2_virt(clb as usize) as *mut u64, 0, 1024); in init()
213 ptr::write_bytes(phys_2_virt(fb as usize) as *mut u64, 0, 256); in init()
219 let mut cmdheaders = phys_2_virt(clb as usize) as *mut u64 as *mut HbaCmdHeader; in init()
226 ptr::write_bytes(phys_2_virt(ctbas[i] as usize) as *mut u64, 0, 256); in init()
Dahcidisk.rs8 use crate::mm::phys_2_virt;
80 (phys_2_virt( in read_at()
123 (phys_2_virt(volatile_read!(cmdheader.ctba) as usize) as *mut HbaCmdTable) in read_at()
240 (phys_2_virt( in write_at()
284 (phys_2_virt(volatile_read!(cmdheader.ctba) as usize) as *mut HbaCmdTable) in write_at()
/DragonOS-0.1.8/kernel/src/driver/virtio/
Dvirtio_impl.rs31 let virt = MMArch::phys_2_virt(paddr).unwrap(); in dma_alloc()
45 NonNull::new(MMArch::phys_2_virt(paddr).unwrap().data() as _).unwrap(), in dma_alloc()
/DragonOS-0.1.8/kernel/src/mm/allocator/
Dbuddy.rs97 core::ptr::write_bytes(MMArch::phys_2_virt(*f)?.data() as *mut u8, 0, A::PAGE_SIZE); in new()
108 MMArch::phys_2_virt(curr_page)?.data() as *mut u8, in new()
241 let entry_virt_addr = unsafe { A::phys_2_virt(Self::entry_addr(base_addr, j)) }; in entry_virt_addr()
249 let page_list = unsafe { A::read(A::phys_2_virt(addr).unwrap()) }; in read_page()
255 let virt_addr = unsafe { A::phys_2_virt(curr_page) }; in write_page()
506 A::phys_2_virt(new_page_list_addr) in buddy_free()
Dkernel_allocator.rs33 let virt_addr = unsafe { MMArch::phys_2_virt(phy_addr).ok_or(AllocError)? }; in alloc_in_buddy()
/DragonOS-0.1.8/kernel/src/mm/
Dmm.h40 #define phys_2_virt(addr) ((unsigned long *)((unsigned long)(addr) + PAGE_OFFSET)) macro
Dpage.rs80 return Arch::phys_2_virt(self.phys).unwrap(); in virt()
498 let table_vaddr = Arch::phys_2_virt(table_paddr)?; in create()
603 MMArch::write_bytes(MMArch::phys_2_virt(frame).unwrap(), 0, MMArch::PAGE_SIZE); in map_phys()
635 let virt: VirtAddr = Arch::phys_2_virt(phys)?; in map_linearly()
Dmod.rs70 pub fn phys_2_virt(addr: usize) -> usize { in phys_2_virt() function
426 unsafe fn phys_2_virt(phys: PhysAddr) -> Option<VirtAddr> { in phys_2_virt() method
Ducontext.rs183 MMArch::phys_2_virt( in try_clone()
194 MMArch::phys_2_virt( in try_clone()
1127 let vaddr = MMArch::phys_2_virt(paddr).unwrap(); in zeroed()
/DragonOS-0.1.8/kernel/src/arch/x86_64/mm/
Dmod.rs311 MMArch::phys_2_virt(PhysAddr::new(0)).unwrap().data() in mm_init()
369 let vaddr = unsafe { MMArch::phys_2_virt(paddr) }.unwrap(); in allocator_init()
468 assert!(MMArch::phys_2_virt(paddr) in test_buddy()
478 let vaddr = unsafe { MMArch::phys_2_virt(paddr).unwrap() }; in test_buddy()
/DragonOS-0.1.8/kernel/src/smp/
Dsmp.c54 memcpy((unsigned char *)phys_2_virt(0x20000), _apu_boot_start, in smp_init()