Lines Matching refs:PhysAddr

9 use crate::mm::{MemoryManagementArch, PhysAddr, VirtAddr};
28 next_page: PhysAddr,
47 next_page: PhysAddr::new(0), in empty()
51 fn new(entry_num: usize, next_page: PhysAddr) -> Self { in new()
67 free_area: [PhysAddr; (MAX_ORDER - MIN_ORDER) as usize],
74 (A::PAGE_SIZE - mem::size_of::<PageList<A>>()) / mem::size_of::<PhysAddr>();
88 let mut free_area: [PhysAddr; (MAX_ORDER - MIN_ORDER) as usize] = in new()
89 [PhysAddr::new(0); (MAX_ORDER - MIN_ORDER) as usize]; in new()
99 let page_list: PageList<A> = PageList::new(0, PhysAddr::new(0)); in new()
138 let page_list_paddr: PhysAddr = free_area[Self::order2index(i as u8)]; in new()
156 let mut page_list_paddr: PhysAddr = free_area[Self::order2index(i as u8)]; in new()
212 let page_list_paddr: PhysAddr = free_area[Self::order2index(i as u8)]; in new()
240 pub fn entry_virt_addr(base_addr: PhysAddr, j: usize) -> VirtAddr { in entry_virt_addr() argument
244 pub fn entry_addr(base_addr: PhysAddr, j: usize) -> PhysAddr { in entry_addr() argument
245 let entry_addr = base_addr + mem::size_of::<PageList<A>>() + j * mem::size_of::<PhysAddr>(); in entry_addr()
248 pub fn read_page<T>(addr: PhysAddr) -> T { in read_page()
253 pub fn write_page(curr_page: PhysAddr, page_list: PageList<A>) { in write_page() argument
279 fn pop_front(&mut self, order: u8) -> Option<PhysAddr> { in pop_front() argument
311 let entry: PhysAddr = unsafe { in pop_front()
321 PhysAddr::new(0), in pop_front()
361 let result: Option<PhysAddr> = alloc_in_specific_order(order as u8); in pop_front()
369 let mut x: Option<PhysAddr> = None; in pop_front()
407 fn buddy_alloc(&mut self, count: PageFrameCount) -> Option<(PhysAddr, PageFrameCount)> { in buddy_alloc() argument
437 unsafe fn buddy_free(&mut self, mut base: PhysAddr, order: u8) { in buddy_free() argument
453 let buddy_addr = PhysAddr::new(base.data() ^ (1 << order)); in buddy_free()
467 let entry: PhysAddr = unsafe { A::read(entry_virt_addr) }; in buddy_free()
575 let entry: PhysAddr = unsafe { in buddy_free()
589 PhysAddr::new(0), in buddy_free()
597 let last_entry: PhysAddr = unsafe { in buddy_free()
611 PhysAddr::new(0), in buddy_free()
618 PhysAddr::new(0), in buddy_free()
636 unsafe fn allocate(&mut self, count: PageFrameCount) -> Option<(PhysAddr, PageFrameCount)> { in allocate() argument
650 unsafe fn free(&mut self, base: PhysAddr, count: PageFrameCount) { in free() argument