Home
last modified time | relevance | path

Searched refs:paddr (Results 1 – 12 of 12) sorted by relevance

/DragonOS-0.1.8/kernel/src/mm/
Dno_init.rs57 pub unsafe fn pseudo_map_phys(vaddr: VirtAddr, paddr: PhysAddr, count: PageFrameCount) { in pseudo_map_phys()
59 assert!(paddr.check_aligned(MMArch::PAGE_SIZE)); in pseudo_map_phys()
73 let paddr = paddr + i * MMArch::PAGE_SIZE; in pseudo_map_phys() localVariable
74 let flusher = mapper.map_phys(vaddr, paddr, flags).unwrap(); in pseudo_map_phys()
Dc_adapter.rs29 pub unsafe extern "C" fn rs_pseudo_map_phys(vaddr: usize, paddr: usize, size: usize) { in rs_pseudo_map_phys()
31 let paddr = PhysAddr::new(paddr); 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()
40 let mut paddr = PhysAddr::new(paddr); in rs_map_phys() localVariable
56 .map_phys(vaddr, paddr, page_flags) in rs_map_phys()
62 paddr += MMArch::PAGE_SIZE; in rs_map_phys()
Dkernel_mapper.rs101 mut paddr: PhysAddr, in map_phys_with_size()
114 let flusher = self.mapper.map_phys(vaddr, paddr, flags).unwrap(); in map_phys_with_size()
121 paddr += MMArch::PAGE_SIZE; in map_phys_with_size()
Dpage.rs201 let paddr = PhysAddr::new(self.data & Arch::PAGE_ADDRESS_MASK); in address() localVariable
204 Ok(paddr) in address()
206 Err(paddr) in address()
676 let paddr = entry.address().ok()?; in translate() localVariable
678 return Some((paddr, flags)); in translate()
693 let (paddr, _, flusher) = self.unmap_phys(virt, unmap_parents)?; in unmap()
694 self.frame_allocator.free_one(paddr); in unmap()
720 .map(|(paddr, flags)| (paddr, flags, PageFlush::<Arch>::new(virt))); in unmap_phys()
Dmod.rs445 if let Some(paddr) = virt.data().checked_sub(Self::PHYS_OFFSET) { in virt_2_phys()
446 return Some(PhysAddr::new(paddr)); in virt_2_phys()
Ducontext.rs850 let (paddr, _, flush) = unsafe { mapper.unmap_phys(page.virt_address(), true) } in unmap()
861 unsafe { deallocate_page_frames(PhysPageFrame::new(paddr), PageFrameCount::new(1)) }; in unmap()
1124 let paddr = mapper.translate(frame.virt_address()).unwrap().0; in zeroed() localVariable
1127 let vaddr = MMArch::phys_2_virt(paddr).unwrap(); in zeroed()
/DragonOS-0.1.8/kernel/src/driver/acpi/
Dacpi.c141 uint64_t paddr = 0; in acpi_init() local
182 paddr = (uint64_t)rsdt_phys_base; in acpi_init()
184 rs_map_phys(acpi_rsdt_virt_addr_base, paddr, PAGE_2M_SIZE, PAGE_KERNEL_PAGE); in acpi_init()
205 paddr = (uint64_t)acpi_RSDT_entry_phys_base; in acpi_init()
207 rs_map_phys(acpi_description_header_base, paddr, PAGE_2M_SIZE, PAGE_KERNEL_PAGE); in acpi_init()
224 paddr = (uint64_t)rsdt_phys_base; in acpi_init()
226 rs_map_phys(acpi_rsdt_virt_addr_base, paddr, PAGE_2M_SIZE, PAGE_KERNEL_PAGE); in acpi_init()
248 paddr = (uint64_t)acpi_RSDT_entry_phys_base; in acpi_init()
250 rs_map_phys(acpi_description_header_base, paddr, PAGE_2M_SIZE, PAGE_KERNEL_PAGE); in acpi_init()
/DragonOS-0.1.8/kernel/src/driver/virtio/
Dvirtio_impl.rs29 let (paddr, count) = in dma_alloc()
31 let virt = MMArch::phys_2_virt(paddr).unwrap(); in dma_alloc()
44 paddr.data(), in dma_alloc()
45 NonNull::new(MMArch::phys_2_virt(paddr).unwrap().data() as _).unwrap(), in dma_alloc()
53 paddr: virtio_drivers::PhysAddr, in dma_dealloc()
71 deallocate_page_frames(PhysPageFrame::new(PhysAddr::new(paddr)), page_count); in dma_dealloc()
/DragonOS-0.1.8/kernel/src/arch/x86_64/mm/
Dmod.rs173 let paddr: usize; in table() localVariable
175 asm!("mov {}, cr3", out(reg) paddr, options(nomem, nostack, preserves_flags)); in table()
177 return PhysAddr::new(paddr); in table()
368 let paddr = area.base.add(i * MMArch::PAGE_SIZE); in allocator_init() localVariable
369 let vaddr = unsafe { MMArch::phys_2_virt(paddr) }.unwrap(); in allocator_init()
373 .map_phys(vaddr, paddr, flags) in allocator_init()
463 let (paddr, allocated_frame_count) = in test_buddy()
466 assert!(paddr.data() % MMArch::PAGE_SIZE == 0); in test_buddy()
468 assert!(MMArch::phys_2_virt(paddr) in test_buddy()
474 v.push((paddr, allocated_frame_count)); in test_buddy()
[all …]
/DragonOS-0.1.8/kernel/src/mm/allocator/
Dbuddy.rs123 let mut paddr = initial_bump_offset; in new() localVariable
133 assert!(paddr & ((1 << i) - 1) == 0); in new()
137 if paddr & (1 << i) != 0 { in new()
143 paddr, in new()
148 paddr += 1 << i; in new()
168 paddr, in new()
171 paddr += block_size; in new()
185 paddr, in new()
188 paddr += block_size; in new()
211 assert!(paddr & ((1 << i) - 1) == 0); in new()
[all …]
Dpage_frame.rs20 pub fn new(paddr: PhysAddr) -> Self { in new()
22 number: paddr.data() / MMArch::PAGE_SIZE, in new()
/DragonOS-0.1.8/kernel/src/driver/pci/
Dpci.rs649 let paddr = PhysAddr::new(self.physical_address_base as usize); in map() localVariable
655 .map_phys_with_size(vaddr, paddr, size as usize, page_flags, true) in map()
1436 let paddr = PhysAddr::new(address as usize); in pci_bar_init() localVariable
1446 .map_phys_with_size(vaddr, paddr, size_want, page_flags, true) in pci_bar_init()