Home
last modified time | relevance | path

Searched refs:vaddr (Results 1 – 24 of 24) sorted by relevance

/DragonOS-0.1.8/kernel/src/debug/
Dkallsyms.c20 #define symbol_to_write(vaddr, tv, etv) \ argument
21 ((vaddr < tv || vaddr > etv) ? 0 : 1)
29 uint64_t vaddr; member
54 int retval = fscanf(filp, "%llx %c %510s\n", &entry->vaddr, &entry->type, str); in read_symbol()
100 text_vaddr = symbol_table[i].vaddr; in read_map()
102 etext_vaddr = symbol_table[i].vaddr; in read_map()
125 if (!symbol_to_write(symbol_table[i].vaddr, text_vaddr, etext_vaddr)) in generate_result()
128 if (symbol_table[i].vaddr == last_vaddr) in generate_result()
132 printf("\t.quad\t%#llx\n", symbol_table[i].vaddr); in generate_result()
135 last_vaddr = symbol_table[i].vaddr; in generate_result()
[all …]
/DragonOS-0.1.8/kernel/src/mm/
Dc_adapter.rs29 pub unsafe extern "C" fn rs_pseudo_map_phys(vaddr: usize, paddr: usize, size: usize) { in rs_pseudo_map_phys()
30 let vaddr = VirtAddr::new(vaddr); 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()
39 let mut vaddr = VirtAddr::new(vaddr); in rs_map_phys() localVariable
56 .map_phys(vaddr, paddr, page_flags) in rs_map_phys()
61 vaddr += MMArch::PAGE_SIZE; in rs_map_phys()
93 let vaddr = VirtAddr::new(ptr as usize); in do_kmalloc() localVariable
97 if unlikely(guard.contains_key(&vaddr)) { in do_kmalloc()
100 drop(Vec::from_raw_parts(vaddr.data() as *mut u8, len, cap)); in do_kmalloc()
[all …]
Dmmio_buddy.rs95 fn create_region(&self, vaddr: VirtAddr) -> MmioBuddyAddrRegion { in create_region()
98 let region: MmioBuddyAddrRegion = MmioBuddyAddrRegion::new(vaddr); in create_region()
115 fn give_back_block(&self, vaddr: VirtAddr, exp: u32) -> Result<i32, SystemError> { in give_back_block()
117 if (vaddr.data() & ((1 << exp) - 1)) != 0 { in give_back_block()
120 let region: MmioBuddyAddrRegion = self.create_region(vaddr); in give_back_block()
141 let vaddr = self.calculate_block_vaddr(region.vaddr, exp - 1); in split_block() localVariable
142 let new_region: MmioBuddyAddrRegion = self.create_region(vaddr); in split_block()
325 fn calculate_block_vaddr(&self, vaddr: VirtAddr, exp: u32) -> VirtAddr { in calculate_block_vaddr()
326 return VirtAddr::new(vaddr.data() ^ (1 << exp as usize)); in calculate_block_vaddr()
343 vaddr: VirtAddr, in pop_buddy_block()
[all …]
Dno_init.rs57 pub unsafe fn pseudo_map_phys(vaddr: VirtAddr, paddr: PhysAddr, count: PageFrameCount) { in pseudo_map_phys()
58 assert!(vaddr.check_aligned(MMArch::PAGE_SIZE)); in pseudo_map_phys()
72 let vaddr = vaddr + i * MMArch::PAGE_SIZE; in pseudo_map_phys() localVariable
74 let flusher = mapper.map_phys(vaddr, paddr, flags).unwrap(); in pseudo_map_phys()
Dmmio.h5 extern int mmio_release(int vaddr, int length);
Dkernel_mapper.rs100 mut vaddr: VirtAddr, in map_phys_with_size()
114 let flusher = self.mapper.map_phys(vaddr, paddr, flags).unwrap(); in map_phys_with_size()
120 vaddr += MMArch::PAGE_SIZE; in map_phys_with_size()
Dmod.rs427 if let Some(vaddr) = phys.data().checked_add(Self::PHYS_OFFSET) { in phys_2_virt()
428 return Some(VirtAddr::new(vaddr)); in phys_2_virt()
573 pub fn rebase(self, vaddr: VirtAddr, new_base: &VirtRegion) -> Option<VirtAddr> { in rebase()
574 if !self.contains(vaddr) { in rebase()
577 let offset = vaddr.data() - self.start().data(); in rebase()
Ducontext.rs318 Some(vaddr) => { in mmap()
320 .find_free_at(self.mmap_min, vaddr, page_count.bytes(), map_flags)? in mmap()
607 pub fn contains(&self, vaddr: VirtAddr) -> Option<Arc<LockedVMA>> { in contains()
610 if guard.region.contains(vaddr) { in contains()
660 vaddr: VirtAddr, in find_free_at()
665 if vaddr == VirtAddr::new(0) { in find_free_at()
671 let requested = VirtRegion::new(vaddr, size); in find_free_at()
673 if requested.end() >= MMArch::USER_END_VADDR || !vaddr.check_aligned(MMArch::PAGE_SIZE) { in find_free_at()
1127 let vaddr = MMArch::phys_2_virt(paddr).unwrap(); in zeroed() localVariable
1128 MMArch::write_bytes(vaddr, 0, MMArch::PAGE_SIZE); in zeroed()
Dpage.rs756 vaddr: VirtAddr, in unmap_phys_inner()
762 let i = table.index_of(vaddr)?; in unmap_phys_inner()
773 let result = unmap_phys_inner(vaddr, &mut subtable, unmap_parents, allocator)?; in unmap_phys_inner()
/DragonOS-0.1.8/docs/kernel/memory_management/
Dmmio.md93 │ │ │ list │ │ │ vaddr │ │ vaddr │ │
149 vaddr: u64,
162 …;&emsp;`MmioFreeRegionList`中的元素类型为`MmioBuddyAddrRegion`结构体,`MmioBuddyAddrRegion`记录了内存块的起始地址(vaddr)。
170 | __create_region(&self, vaddr) | 将虚拟地址传入,创建新的内存块地址结构体 …
171 | __give_back_block(&self, vaddr, exp) | 将地址为vaddr,幂为exp的内存块归还给buddy …
176 | __buddy_block_vaddr(&self, vaddr, exp) | 根据地址和内存块大小,计算伙伴块虚拟内存的地址 …
177 | __pop_buddy_block( &self, vaddr,exp,list_guard) | 寻找并弹出指定内存块的伙伴块 …
189 | mmio_release(vaddr, length) | 取消地址为vaddr,大小为length的mmio的映射并将其归还到buddy中 |
/DragonOS-0.1.8/kernel/src/driver/virtio/
Dvirtio_impl.rs54 vaddr: NonNull<u8>, in dma_dealloc()
62 let vaddr = VirtAddr::new(vaddr.as_ptr() as *mut u8 as usize); in dma_dealloc() localVariable
66 .remap(vaddr, kernel_page_flags(vaddr)) in dma_dealloc()
88 let vaddr = VirtAddr::new(buffer.as_ptr() as *mut u8 as usize); in share() localVariable
91 return MMArch::virt_2_phys(vaddr).unwrap().data(); in share()
Dtransport_pci.rs399 vaddr: VirtAddr,
438 Self::Misaligned { vaddr, alignment } => write!( in fmt()
441 vaddr, alignment in fmt()
476 let vaddr = (bar_info in get_bar_region() localVariable
480 if vaddr % align_of::<T>() != 0 { in get_bar_region()
482 vaddr, in get_bar_region()
486 let vaddr = NonNull::new(vaddr as *mut u8).unwrap(); in get_bar_region() localVariable
487 Ok(vaddr.cast()) in get_bar_region()
/DragonOS-0.1.8/kernel/src/driver/video/
Dvideo.c37 …video_frame_buffer_info.vaddr = SPECIAL_MEMOEY_MAPPING_VIRT_ADDR_BASE + FRAME_BUFFER_MAPPING_OFFSE… in init_frame_buffer()
39 …rs_map_phys(video_frame_buffer_info.vaddr, __fb_info.framebuffer_addr, video_frame_buffer_info.siz… in init_frame_buffer()
62 if (video_frame_buffer_info.vaddr != NULL) in video_refresh_daemon()
63 … memcpy((void *)video_frame_buffer_info.vaddr, (void *)video_refresh_target->vaddr, in video_refresh_daemon()
184 video_frame_buffer_info.vaddr = 0xffff800003000000; in video_init()
188 …rs_pseudo_map_phys(video_frame_buffer_info.vaddr, __fb_info.framebuffer_addr, video_frame_buffer_i… in video_init()
/DragonOS-0.1.8/kernel/src/common/
Dglib.h284 static __always_inline void __write8b(uint64_t vaddr, uint64_t value) in __write8b() argument
286 asm volatile("movq %%rdx, 0(%%rax)" ::"a"(vaddr), "d"(value) in __write8b()
298 static __always_inline void __write4b(uint64_t vaddr, uint32_t value) in __write4b() argument
300 asm volatile("movl %%edx, 0(%%rax)" ::"a"(vaddr), "d"(value) in __write4b()
312 static __always_inline uint64_t __read8b(uint64_t vaddr) in __read8b() argument
317 : "a"(vaddr) in __read8b()
329 static __always_inline uint32_t __read4b(uint64_t vaddr) in __read4b() argument
334 : "a"(vaddr) in __read4b()
/DragonOS-0.1.8/kernel/src/libs/libUI/
Dscreen_manager.c50 buf->vaddr = buf_vaddr; in __create_buffer()
68 if (unlikely(buf->vaddr == NULL)) in __destroy_buffer()
70 if (unlikely(verify_area(buf->vaddr, buf->size) == true)) in __destroy_buffer()
77 kfree((void*)buf->vaddr); in __destroy_buffer()
285 if (ui->buf->vaddr == NULL) in scm_framework_enable()
311 if (ui->buf->vaddr == NULL) in scm_framework_disable()
Dscreen_manager.h26 uint64_t vaddr; // 帧缓冲区的地址 member
Dtextui-render.c124 uint32_t *fb = (uint32_t *)textui_framework.buf->vaddr; in __textui_render_chromatic()
Dtextui.c100 memcpy((void *)buf->vaddr, (void *)(textui_framework.buf->vaddr), textui_framework.buf->size); in textui_change_handler()
/DragonOS-0.1.8/kernel/src/arch/x86_64/mm/
Dmod.rs369 let vaddr = unsafe { MMArch::phys_2_virt(paddr) }.unwrap(); in allocator_init() localVariable
370 let flags = kernel_page_flags::<MMArch>(vaddr); in allocator_init()
373 .map_phys(vaddr, paddr, flags) in allocator_init()
478 let vaddr = unsafe { MMArch::phys_2_virt(paddr).unwrap() }; in test_buddy() localVariable
481 vaddr.data() as *mut u8, in test_buddy()
596 let vaddr = VirtAddr::new(i * MMArch::PAGE_SIZE); in remap_at_low_address() localVariable
597 let flags = kernel_page_flags::<MMArch>(vaddr); in remap_at_low_address()
600 .map_phys(vaddr, paddr, flags) in remap_at_low_address()
612 let vaddr = VirtAddr::new(i * MMArch::PAGE_SIZE); in unmap_at_low_address() localVariable
616 .unmap_phys(vaddr, true) in unmap_at_low_address()
/DragonOS-0.1.8/kernel/src/driver/pci/
Dpci_irq.rs506 let vaddr = msix_bar in msix_install() localVariable
512 let msix_entry = NonNull::new(vaddr as *mut MsixEntry).unwrap(); in msix_install()
622 let vaddr = msix_bar in msix_uninstall() localVariable
628 let msix_entry = NonNull::new(vaddr as *mut MsixEntry).unwrap(); in msix_uninstall()
750 let vaddr = msix_bar.virtual_address().unwrap() as usize in msix_mask() localVariable
753 let msix_entry = NonNull::new(vaddr as *mut MsixEntry).unwrap(); in msix_mask()
870 let vaddr = msix_bar.virtual_address().unwrap() as usize in msix_unmask() localVariable
873 let msix_entry = NonNull::new(vaddr as *mut MsixEntry).unwrap(); in msix_unmask()
984 let vaddr = pending_bar.virtual_address().unwrap() as usize in msix_check_pending() localVariable
987 let pending_entry = NonNull::new(vaddr as *mut PendingEntry).unwrap(); in msix_check_pending()
Dpci.rs648 let vaddr = VirtAddr::new(virtaddress as usize); in map() localVariable
655 .map_phys_with_size(vaddr, paddr, size as usize, page_flags, true) in map()
1435 let vaddr = VirtAddr::new(virtaddress as usize); in pci_bar_init() localVariable
1446 .map_phys_with_size(vaddr, paddr, size_want, page_flags, true) in pci_bar_init()
/DragonOS-0.1.8/kernel/src/mm/allocator/
Dpage_frame.rs84 pub fn new(vaddr: VirtAddr) -> Self { in new()
86 number: vaddr.data() / MMArch::PAGE_SIZE, in new()
/DragonOS-0.1.8/kernel/src/libs/
Delf.rs293 mut vaddr: VirtAddr, in do_load_file()
314 copy_to_user(vaddr, &buf[..read_size]).map_err(|_| SystemError::EFAULT)?; in do_load_file()
317 vaddr += read_size; in do_load_file()
555 let vaddr = VirtAddr::new(seg_to_load.p_vaddr as usize); in load() localVariable
579 vaddr + load_bias, in load()
/DragonOS-0.1.8/kernel/src/syscall/
Dmod.rs499 Self::brk(new_brk).map(|vaddr| vaddr.data()) in handle()
504 Self::sbrk(increment).map(|vaddr| vaddr.data()) in handle()
961 let vaddr = VirtAddr::new(kstat as usize); in handle() localVariable
964 match verify_area(vaddr, core::mem::size_of::<PosixKstat>()) { in handle()