/DragonOS-0.1.9/kernel/src/mm/allocator/ |
D | page_frame.rs | 130 pub fn add(&self, n: PageFrameCount) -> Self { in add() 171 pub struct PageFrameCount(usize); struct 173 impl PageFrameCount { impl 200 impl Add for PageFrameCount { implementation 208 impl AddAssign for PageFrameCount { implementation 214 impl Sub for PageFrameCount { implementation 222 impl SubAssign for PageFrameCount { implementation 228 impl Mul for PageFrameCount { implementation 236 impl Add<usize> for PageFrameCount { implementation 244 impl AddAssign<usize> for PageFrameCount { implementation [all …]
|
D | bump.rs | 5 use super::page_frame::{FrameAllocator, PageFrameCount, PageFrameUsage}; 104 unsafe fn ensure_early_mapping(&self, start_paddr: PhysAddr, count: PageFrameCount) { in ensure_early_mapping() argument 119 pseudo_map_phys(vaddr, p.phys_address(), PageFrameCount::new(1)); in ensure_early_mapping() 131 unsafe fn allocate(&mut self, count: PageFrameCount) -> Option<(PhysAddr, PageFrameCount)> { in allocate() argument 171 unsafe fn free(&mut self, _address: PhysAddr, _count: PageFrameCount) { in free() argument 199 let frame = PageFrameUsage::new(PageFrameCount::new(used), PageFrameCount::new(total)); in usage()
|
D | buddy.rs | 8 use crate::mm::allocator::page_frame::{FrameAllocator, PageFrameCount, PageFrameUsage}; 69 total: PageFrameCount, 101 total: PageFrameCount::new(0), in new() 105 let mut total_pages_to_buddy = PageFrameCount::new(0); in new() 116 PageFrameCount::from_bytes(area.area_end_aligned().data() - paddr).unwrap(); in new() 352 fn buddy_alloc(&mut self, count: PageFrameCount) -> Option<(PhysAddr, PageFrameCount)> { in buddy_alloc() argument 373 .map(|addr| (addr, PageFrameCount::new(1 << (order as usize - MIN_ORDER)))); in buddy_alloc() 444 self.buddy_alloc(PageFrameCount::new(1)) in buddy_free() 581 unsafe fn allocate(&mut self, count: PageFrameCount) -> Option<(PhysAddr, PageFrameCount)> { in allocate() argument 595 unsafe fn free(&mut self, base: PhysAddr, count: PageFrameCount) { in free() argument [all …]
|
D | kernel_allocator.rs | 16 use super::page_frame::{FrameAllocator, PageFrameCount}; 31 let page_frame_count = PageFrameCount::new(count); in alloc_in_buddy() 53 let page_frame_count = PageFrameCount::new(count); in free_in_buddy()
|
/DragonOS-0.1.9/kernel/src/mm/ |
D | no_init.rs | 21 allocator::page_frame::{FrameAllocator, PageFrameCount, PageFrameUsage}, 110 unsafe fn allocate(&mut self, count: PageFrameCount) -> Option<(PhysAddr, PageFrameCount)> { in allocate() argument 117 unsafe fn free(&mut self, address: PhysAddr, count: PageFrameCount) { in free() argument 143 pub unsafe fn pseudo_map_phys(vaddr: VirtAddr, paddr: PhysAddr, count: PageFrameCount) { in pseudo_map_phys() argument 152 pub unsafe fn pseudo_map_phys_ro(vaddr: VirtAddr, paddr: PhysAddr, count: PageFrameCount) { in pseudo_map_phys_ro() argument 162 count: PageFrameCount, in pseudo_map_phys_with_flags() argument 193 pub unsafe fn pseudo_unmap_phys(vaddr: VirtAddr, count: PageFrameCount) { in pseudo_unmap_phys() argument
|
D | early_ioremap.rs | 12 use super::{allocator::page_frame::PageFrameCount, MemoryManagementArch, PhysAddr, VirtAddr}; 89 let slot_count = PageFrameCount::from_bytes(page_align_up(size)) in map() 115 let page_count = PageFrameCount::new(slot_count); in map() 179 let count = PageFrameCount::from_bytes(slot_guard[idx].size as usize).unwrap(); in unmap()
|
D | c_adapter.rs | 17 allocator::page_frame::PageFrameCount, kernel_mapper::KernelMapper, mmio_buddy::mmio_pool, 31 let count = PageFrameCount::new(page_align_up(size) / MMArch::PAGE_SIZE); in rs_pseudo_map_phys() 40 let count = PageFrameCount::new(page_align_up(size) / MMArch::PAGE_SIZE); in rs_map_phys()
|
D | kernel_mapper.rs | 11 mm::{allocator::page_frame::PageFrameCount, MMArch, MemoryManagementArch}, 114 let count = PageFrameCount::new(page_align_up(size) / MMArch::PAGE_SIZE); in map_phys_with_size()
|
D | ucontext.rs | 33 deallocate_page_frames, PageFrameCount, PhysPageFrame, VirtPageFrame, VirtPageFrameIter, 180 PageFrameCount::new(vma_guard.region.size() / MMArch::PAGE_SIZE), in try_clone() 286 PageFrameCount::from_bytes(len).unwrap(), in map_anonymous() 317 PageFrameCount, in mmap() argument 325 page_count: PageFrameCount, in mmap() argument 330 if page_count == PageFrameCount::new(0) { in mmap() 421 let page_count = PageFrameCount::from_bytes(new_len).unwrap(); in mremap() 458 page_count: PageFrameCount, in munmap() argument 494 page_count: PageFrameCount, in mprotect() argument 613 PageFrameCount::from_bytes(unmap_len).unwrap(), in set_brk() [all …]
|
D | syscall.rs | 15 allocator::page_frame::{PageFrameCount, VirtPageFrame}, 359 let page_count = PageFrameCount::new(len / MMArch::PAGE_SIZE); in munmap() 395 let page_count = PageFrameCount::new(len / MMArch::PAGE_SIZE); in mprotect()
|
/DragonOS-0.1.9/kernel/src/driver/net/ |
D | dma.rs | 9 allocate_page_frames, deallocate_page_frames, PageFrameCount, PhysPageFrame, 19 let page_num = PageFrameCount::new( in dma_alloc() 46 let page_count = PageFrameCount::new( in dma_dealloc()
|
/DragonOS-0.1.9/kernel/src/driver/virtio/ |
D | virtio_impl.rs | 9 allocate_page_frames, deallocate_page_frames, PageFrameCount, PhysPageFrame, 25 let page_num = PageFrameCount::new( in dma_alloc() 57 let page_count = PageFrameCount::new( in dma_dealloc()
|
/DragonOS-0.1.9/kernel/src/arch/riscv64/mm/ |
D | mod.rs | 10 page_frame::{FrameAllocator, PageFrameCount, PageFrameUsage, PhysPageFrame}, 191 unsafe fn allocate(&mut self, count: PageFrameCount) -> Option<(PhysAddr, PageFrameCount)> { in allocate() argument 199 unsafe fn free(&mut self, address: crate::mm::PhysAddr, count: PageFrameCount) { in free() argument
|
/DragonOS-0.1.9/kernel/src/arch/x86_64/mm/ |
D | mod.rs | 19 use crate::mm::allocator::page_frame::{FrameAllocator, PageFrameCount, PageFrameUsage}; 516 let mut v: Vec<(PhysAddr, PageFrameCount)> = Vec::with_capacity(60 * 1024); in test_buddy() 534 let random_size = PageFrameCount::from_bytes(random_size.next_power_of_two()).unwrap(); in test_buddy() 603 unsafe fn allocate(&mut self, count: PageFrameCount) -> Option<(PhysAddr, PageFrameCount)> { in allocate() argument 611 unsafe fn free(&mut self, address: crate::mm::PhysAddr, count: PageFrameCount) { in free() argument
|
/DragonOS-0.1.9/kernel/src/driver/video/ |
D | mod.rs | 14 allocator::page_frame::PageFrameCount, kernel_mapper::KernelMapper, page::PageFlags, 98 let count = PageFrameCount::new( in init_frame_buffer()
|
/DragonOS-0.1.9/kernel/src/libs/ |
D | elf.rs | 24 allocator::page_frame::{PageFrameCount, VirtPageFrame}, 269 PageFrameCount::from_bytes(to_unmap_size).unwrap(), in load_elf_segment() 282 PageFrameCount::from_bytes(page_align_up(map_size)).unwrap(), in load_elf_segment() 308 PageFrameCount::from_bytes(page_align_up(map_size)).unwrap(), in load_elf_segment()
|
/DragonOS-0.1.9/kernel/src/driver/video/fbdev/ |
D | vesafb.rs | 51 allocator::page_frame::PageFrameCount, no_init::pseudo_map_phys, MemoryManagementArch, 892 PageFrameCount::new(page_align_up(boottime_screen_info.lfb_size) / MMArch::PAGE_SIZE); in vesafb_early_init()
|