Home
last modified time | relevance | path

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

/DragonOS-0.1.2/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.2/kernel/src/mm/
Dmmio.c43 *res_vaddr = buddy_region->vaddr; in mmio_create()
57 … retval = mm_create_vma(&initial_mm, buddy_region->vaddr + i, PAGE_2M_SIZE, vm_flags, NULL, NULL); in mmio_create()
64 … retval = mm_create_vma(&initial_mm, buddy_region->vaddr + i, PAGE_4K_SIZE, vm_flags, NULL, NULL); in mmio_create()
82 int mmio_release(uint64_t vaddr, uint64_t length) in mmio_release() argument
86 mm_unmap(&initial_mm, vaddr, length, false); in mmio_release()
91 struct vm_area_struct *vma = vma_find(&initial_mm, vaddr + i); in mmio_release()
94 …kerror("mmio_release failed: vma not found. At address: %#018lx, pid=%ld", vaddr + i, current_pcb-… in mmio_release()
98 if (unlikely(vma->vm_start != (vaddr + i))) in mmio_release()
100 kerror("mmio_release failed: addr_start is not equal to current: %#018lx.", vaddr + i); in mmio_release()
Dmmio-buddy.c14 #define buddy_block_vaddr(vaddr, exp) (vaddr ^ (1UL << exp)) argument
39 static __always_inline struct __mmio_buddy_addr_region *__mmio_buddy_create_region(uint64_t vaddr) in __mmio_buddy_create_region() argument
45 region->vaddr = vaddr; in __mmio_buddy_create_region()
58 …dy_addr_region *new_region = __mmio_buddy_create_region(buddy_block_vaddr(region->vaddr, exp - 1)); in __buddy_split()
75 if (unlikely(x->vaddr != buddy_block_vaddr(y->vaddr, exp))) // 不是一对伙伴 in __buddy_merge_blocks()
120 uint64_t buddy_vaddr = buddy_block_vaddr(x->vaddr, exp); in __find_buddy()
127 if (bd->vaddr == buddy_vaddr) // 找到了伙伴块 in __find_buddy()
225 int __mmio_buddy_give_back(uint64_t vaddr, int exp) in __mmio_buddy_give_back() argument
228 if (vaddr & ((1UL << exp) - 1)) in __mmio_buddy_give_back()
231 struct __mmio_buddy_addr_region *region = __mmio_buddy_create_region(vaddr); in __mmio_buddy_give_back()
Dutils.c12 uint64_t __mm_get_paddr(struct mm_struct *mm, uint64_t vaddr) in __mm_get_paddr() argument
16 tmp = phys_2_virt((ul *)(((ul)mm->pgd) & (~0xfffUL)) + ((vaddr >> PAGE_GDT_SHIFT) & 0x1ff)); in __mm_get_paddr()
22 tmp = phys_2_virt((ul *)(*tmp & (~0xfffUL)) + ((vaddr >> PAGE_1G_SHIFT) & 0x1ff)); in __mm_get_paddr()
29 tmp = phys_2_virt(((ul *)(*tmp & (~0xfffUL)) + (((ul)(vaddr) >> PAGE_2M_SHIFT) & 0x1ff))); in __mm_get_paddr()
43 tmp = phys_2_virt(((ul *)(*tmp & (~0xfffUL)) + (((ul)(vaddr) >> PAGE_4K_SHIFT) & 0x1ff))); in __mm_get_paddr()
Dslab.h27 void *vaddr; member
49 void *(*constructor)(void *vaddr, ul arg);
50 void *(*destructor)(void *vaddr, ul arg);
91 …lab *slab_create(ul size, void *(*constructor)(void *vaddr, ul arg), void *(*destructor)(void *vad…
Dmmio-buddy.h19 uint64_t vaddr; // 该内存对象起始位置的虚拟地址 member
65 int __mmio_buddy_give_back(uint64_t vaddr, int exp);
Dmmap.c143 uint64_t *vaddr = kmalloc(PAGE_4K_SIZE, 0); in mm_map_proc_page_table() local
144 memset(vaddr, 0, PAGE_4K_SIZE); in mm_map_proc_page_table()
145 … set_pdt(pde_ptr, mk_pdt(virt_2_phys(vaddr), (user ? PAGE_USER_PDE : PAGE_KERNEL_PDE))); in mm_map_proc_page_table()
320 int mm_create_vma(struct mm_struct *mm, uint64_t vaddr, uint64_t length, vm_flags_t vm_flags, struc… in mm_create_vma() argument
324 if (unlikely(vaddr & (PAGE_4K_SIZE - 1))) in mm_create_vma()
332 vma->vm_start = vaddr; in mm_create_vma()
333 vma->vm_end = vaddr + length; in mm_create_vma()
473 int mm_map(struct mm_struct *mm, uint64_t vaddr, uint64_t length, uint64_t paddr) in mm_map() argument
480 struct vm_area_struct *vma = vma_find(mm, vaddr + mapped); in mm_map()
483 …kerror("Map addr failed: vma not found. At address: %#018lx, pid=%ld", vaddr + mapped, current_pcb… in mm_map()
[all …]
Dslab.c33 …lab *slab_create(ul size, void *(*constructor)(void *vaddr, ul arg), void *(*destructor)(void *vad… in slab_create() argument
89 slab_pool->cache_pool_entry->vaddr = phys_2_virt(slab_pool->cache_pool_entry->page->addr_phys); in slab_create()
195 tmp_slab_obj->vaddr = phys_2_virt(tmp_slab_obj->page->addr_phys); in slab_malloc()
255 … return slab_pool->constructor((char *)slab_obj_ptr->vaddr + slab_pool->size * i, arg); in slab_malloc()
259 return (void *)((char *)slab_obj_ptr->vaddr + slab_pool->size * i); in slab_malloc()
296 if (!(slab_obj_ptr->vaddr <= addr && addr <= (slab_obj_ptr->vaddr + PAGE_2M_SIZE))) in slab_free()
304 int index = (addr - slab_obj_ptr->vaddr) / slab_pool->size; in slab_free()
317 slab_pool->destructor((char *)slab_obj_ptr->vaddr + slab_pool->size * index, arg); in slab_free()
423 kmalloc_cache_group[i].cache_pool_entry->vaddr = virt; in slab_init()
451 ul *vaddr = NULL; in kmalloc_create_slab_obj() local
[all …]
Dmmio.h24 int mmio_release(uint64_t vaddr, uint64_t size);
Dinternal.h33 uint64_t __mm_get_paddr(struct mm_struct *mm, uint64_t vaddr);
Dmm.h455 int mm_create_vma(struct mm_struct *mm, uint64_t vaddr, uint64_t length, vm_flags_t vm_flags,
478 int mm_map(struct mm_struct *mm, uint64_t vaddr, uint64_t length, uint64_t paddr);
499 int mm_unmap(struct mm_struct *mm, uint64_t vaddr, uint64_t length, bool destroy);
/DragonOS-0.1.2/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.2/kernel/src/driver/video/
Dvideo.c40 …video_frame_buffer_info.vaddr = SPECIAL_MEMOEY_MAPPING_VIRT_ADDR_BASE + FRAME_BUFFER_MAPPING_OFFSE… in init_frame_buffer()
41 …mm_map_proc_page_table(global_CR3, true, video_frame_buffer_info.vaddr, __fb_info.framebuffer_addr, in init_frame_buffer()
66 memcpy((void *)video_frame_buffer_info.vaddr, (void *)video_refresh_target->vaddr, in video_refresh_daemon()
185 video_frame_buffer_info.vaddr = 0xffff800003000000; in video_init()
186 …mm_map_phys_addr(video_frame_buffer_info.vaddr, __fb_info.framebuffer_addr, video_frame_buffer_inf… in video_init()
/DragonOS-0.1.2/kernel/src/libs/libUI/
Dscreen_manager.c50 buf->vaddr = (uint64_t)phys_2_virt(p->addr_phys); 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 …free_pages(Phy_to_2M_Page(virt_2_phys(buf->vaddr)), PAGE_2M_ALIGN(video_frame_buffer_info.size) / … in __destroy_buffer()
286 if (ui->buf->vaddr == NULL) in scm_framework_enable()
Dscreen_manager.h26 uint64_t vaddr; // 帧缓冲区的地址 member
Dtextui-render.c124 uint32_t *fb = (uint32_t *)textui_framework.buf->vaddr; in __textui_render_chromatic()
Dtextui.c94 memcpy((void *)buf->vaddr, (void *)(textui_framework.buf->vaddr), textui_framework.buf->size); in textui_change_handler()
/DragonOS-0.1.2/kernel/src/driver/usb/xhci/
Dxhci.c161 static __always_inline void __write_slot(const uint64_t vaddr, struct xhci_slot_context_t *slot_ctx) in __write_slot() argument
163 memcpy((void *)vaddr, slot_ctx, sizeof(struct xhci_slot_context_t)); in __write_slot()
546 const uint64_t vaddr = (uint64_t)kmalloc(total_size, 0); in xhci_create_ring() local
548 memset((void *)vaddr, 0, total_size); in xhci_create_ring()
551 xhci_TRB_set_link_cmd(vaddr + total_size - sizeof(struct xhci_TRB_t)); in xhci_create_ring()
553 return vaddr; in xhci_create_ring()