Home
last modified time | relevance | path

Searched refs:pgd (Results 1 – 7 of 7) sorted by relevance

/DragonOS-0.1.2/kernel/src/process/
Dfork.c231 new_mms->pgd = (pml4t_t *)virt_2_phys(kmalloc(PAGE_4K_SIZE, 0)); in process_copy_mm()
233 memset(phys_2_virt(new_mms->pgd), 0, PAGE_4K_SIZE / 2); in process_copy_mm()
236 …memcpy(phys_2_virt(new_mms->pgd) + 256, phys_2_virt(initial_proc[proc_current_cpu_id]->mm->pgd) + … in process_copy_mm()
239 uint64_t *current_pgd = (uint64_t *)phys_2_virt(current_pcb->mm->pgd); in process_copy_mm()
241 uint64_t *new_pml4t = (uint64_t *)phys_2_virt(new_mms->pgd); in process_copy_mm()
Dprocess.h172 …asm volatile("movq %0, %%cr3 \n\t" ::"r"(next_pcb->mm->pgd) : "memory"); …
Dprocess.c368 new_mms->pgd = (pml4t_t *)virt_2_phys(kmalloc(PAGE_4K_SIZE, 0)); in do_execve()
371 memset(phys_2_virt(new_mms->pgd), 0, PAGE_4K_SIZE / 2); in do_execve()
374 …memcpy(phys_2_virt(new_mms->pgd) + 256, phys_2_virt(initial_proc[proc_current_cpu_id]) + 256, PAGE… in do_execve()
744 if (pcb->mm->pgd == NULL) in process_exit_mm()
751 pml4t_t *current_pgd = (pml4t_t *)phys_2_virt(pcb->mm->pgd); in process_exit_mm()
/DragonOS-0.1.2/kernel/src/mm/
Dutils.c16 tmp = phys_2_virt((ul *)(((ul)mm->pgd) & (~0xfffUL)) + ((vaddr >> PAGE_GDT_SHIFT) & 0x1ff)); in __mm_get_paddr()
Dmm-types.h144 pml4t_t *pgd; // 内存页表指针 member
Dmmap.c412 …retval = mm_map_proc_page_table((uint64_t)vma->vm_mm->pgd, true, vma->vm_start + offset, paddr, le… in mm_map_vma()
431 …retval = mm_map_proc_page_table((uint64_t)vma->vm_mm->pgd, true, vma->vm_start + offset + mapped, … in mm_map_vma()
447 …retval = mm_map_proc_page_table((uint64_t)vma->vm_mm->pgd, true, vma->vm_start + offset + mapped, … in mm_map_vma()
528 mm_unmap_proc_table((uint64_t)mm->pgd, true, vma->vm_start, vma->vm_end - vma->vm_start); in mm_unmap_vma()
Dmm.c233 initial_mm.pgd = (pml4t_t *)get_CR3(); in mm_init()
653 … uint64_t phys = mm_get_PDE((uint64_t)phys_2_virt((uint64_t)current_pcb->mm->pgd), false, i, true); in mm_do_brk()
666 …mm_unmap_proc_table((uint64_t)phys_2_virt((uint64_t)current_pcb->mm->pgd), false, end_addr, PAGE_2… in mm_do_brk()