Home
last modified time | relevance | path

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

/DragonOS-0.1.8/kernel/src/mm/allocator/
Dbuddy.rs9 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()
[all …]
Dpage_frame.rs8 mm::{MemoryManagementArch, PhysAddr, VirtAddr},
20 pub fn new(paddr: PhysAddr) -> Self { in new()
27 pub fn phys_address(&self) -> PhysAddr { in phys_address() argument
28 return PhysAddr::new(self.number * MMArch::PAGE_SIZE); in phys_address()
287 unsafe fn allocate(&mut self, count: PageFrameCount) -> Option<(PhysAddr, PageFrameCount)>; in allocate() argument
290 unsafe fn free(&mut self, address: PhysAddr, count: PageFrameCount); in free() argument
292 unsafe fn allocate_one(&mut self) -> Option<PhysAddr> { in allocate_one() argument
296 unsafe fn free_one(&mut self, address: PhysAddr) { in free_one() argument
305 unsafe fn allocate(&mut self, count: PageFrameCount) -> Option<(PhysAddr, PageFrameCount)> { in allocate() argument
308 unsafe fn free(&mut self, address: PhysAddr, count: PageFrameCount) { in free() argument
[all …]
Dbump.rs6 use crate::mm::{MemoryManagementArch, PhysAddr, PhysMemoryArea};
47 unsafe fn allocate(&mut self, count: PageFrameCount) -> Option<(PhysAddr, PageFrameCount)> { in allocate() argument
76 return Some((PhysAddr(res_page_phys), count)); in allocate()
82 unsafe fn free(&mut self, _address: PhysAddr, _count: PageFrameCount) { in free() argument
/DragonOS-0.1.8/kernel/src/mm/
Dmod.rs85 pub struct PhysAddr(usize); struct
87 impl PhysAddr { impl
117 impl Debug for PhysAddr { implementation
123 impl core::ops::Add<usize> for PhysAddr { implementation
132 impl core::ops::AddAssign<usize> for PhysAddr { implementation
139 impl core::ops::Add<PhysAddr> for PhysAddr { implementation
143 fn add(self, rhs: PhysAddr) -> Self::Output { in add()
148 impl core::ops::AddAssign<PhysAddr> for PhysAddr { implementation
150 fn add_assign(&mut self, rhs: PhysAddr) { in add_assign() argument
155 impl core::ops::Sub<usize> for PhysAddr { implementation
[all …]
Dno_init.rs11 use crate::mm::{MMArch, MemoryManagementArch, PhysAddr};
35 unsafe fn allocate(&mut self, _count: PageFrameCount) -> Option<(PhysAddr, PageFrameCount)> { in allocate() argument
39 unsafe fn free(&mut self, _address: PhysAddr, _count: PageFrameCount) { in free() argument
57 pub unsafe fn pseudo_map_phys(vaddr: VirtAddr, paddr: PhysAddr, count: PageFrameCount) { in pseudo_map_phys() argument
Dpage.rs17 PhysAddr, VirtAddr,
25 phys: PhysAddr,
33 pub unsafe fn new(base: VirtAddr, phys: PhysAddr, level: usize) -> Self { in new() argument
61 pub fn phys(&self) -> PhysAddr { in phys() argument
200 pub fn address(&self) -> Result<PhysAddr, PhysAddr> { in address() argument
201 let paddr = PhysAddr::new(self.data & Arch::PAGE_ADDRESS_MASK); in address()
468 table_paddr: PhysAddr,
485 pub unsafe fn new(table_kind: PageTableKind, table_paddr: PhysAddr, allocator: F) -> Self { in new() argument
551 let phys: PhysAddr = self.frame_allocator.allocate_one()?; in map()
560 phys: PhysAddr, in map_phys() argument
[all …]
Dc_adapter.rs19 page::PageFlags, MemoryManagementArch, PhysAddr, VirtAddr,
31 let paddr = PhysAddr::new(paddr); in rs_pseudo_map_phys()
40 let mut paddr = PhysAddr::new(paddr); in rs_map_phys()
Dkernel_mapper.rs1 use super::{page::PageFlags, PageTableKind, PhysAddr, VirtAddr};
101 mut paddr: PhysAddr, in map_phys_with_size() argument
/DragonOS-0.1.8/kernel/src/driver/virtio/
Dvirtio_impl.rs11 MemoryManagementArch, PhysAddr, VirtAddr,
24 ) -> (virtio_drivers::PhysAddr, NonNull<u8>) { in dma_alloc() argument
53 paddr: virtio_drivers::PhysAddr, in dma_dealloc() argument
71 deallocate_page_frames(PhysPageFrame::new(PhysAddr::new(paddr)), page_count); in dma_dealloc()
78 unsafe fn mmio_phys_to_virt(_paddr: virtio_drivers::PhysAddr, _size: usize) -> NonNull<u8> { in mmio_phys_to_virt() argument
87 ) -> virtio_drivers::PhysAddr { in share() argument
95 _paddr: virtio_drivers::PhysAddr, in unshare() argument
Dtransport_pci.rs18 Error, Hal, PhysAddr,
265 descriptors: PhysAddr, in queue_set() argument
266 driver_area: PhysAddr, in queue_set() argument
267 device_area: PhysAddr, in queue_set() argument
/DragonOS-0.1.8/kernel/src/arch/x86_64/mm/
Dmod.rs26 use crate::mm::{MemoryManagementArch, PageTableKind, PhysAddr, PhysMemoryArea, VirtAddr};
42 base: PhysAddr::new(0),
47 static mut INITIAL_CR3_VALUE: PhysAddr = PhysAddr::new(0);
172 unsafe fn table(_table_kind: PageTableKind) -> PhysAddr { in table() argument
177 return PhysAddr::new(paddr); in table()
181 unsafe fn set_table(_table_kind: PageTableKind, table: PhysAddr) { in set_table() argument
193 fn initial_page_table() -> PhysAddr { in initial_page_table()
253 PHYS_MEMORY_AREAS[areas_count].base = PhysAddr::new(mb2_mem_info[i].addr as usize); in init_memory_area_from_multiboot2()
311 MMArch::phys_2_virt(PhysAddr::new(0)).unwrap().data() in mm_init()
340 let new_page_table: PhysAddr; in allocator_init()
[all …]
/DragonOS-0.1.8/kernel/src/driver/pci/
Dpci.rs11 use crate::mm::{PhysAddr, VirtAddr};
649 let paddr = PhysAddr::new(self.physical_address_base as usize); in map()
1436 let paddr = PhysAddr::new(address as usize); in pci_bar_init()