Searched refs:pgd (Results 1 – 8 of 8) sorted by relevance
/DragonOS-0.1.7/kernel/src/arch/x86_64/mm/ |
D | mod.rs | 21 let pml4t = unsafe { read_volatile(&next_pcb.mm.as_ref().unwrap().pgd) }; in switch_mm()
|
/DragonOS-0.1.7/kernel/src/process/ |
D | fork.c | 206 new_mms->pgd = (pml4t_t *)virt_2_phys(kmalloc(PAGE_4K_SIZE, 0)); in process_copy_mm() 208 memset(phys_2_virt(new_mms->pgd), 0, PAGE_4K_SIZE / 2); in process_copy_mm() 211 …memcpy(phys_2_virt(new_mms->pgd) + 256, phys_2_virt(initial_proc[proc_current_cpu_id]->mm->pgd) + … in process_copy_mm() 214 uint64_t *current_pgd = (uint64_t *)phys_2_virt(current_pcb->mm->pgd); in process_copy_mm() 216 uint64_t *new_pml4t = (uint64_t *)phys_2_virt(new_mms->pgd); in process_copy_mm()
|
D | process.h | 172 …asm volatile("movq %0, %%cr3 \n\t" ::"r"(next_pcb->mm->pgd) : "memory"); …
|
D | process.c | 428 new_mms->pgd = (pml4t_t *)virt_2_phys(kmalloc(PAGE_4K_SIZE, 0)); in do_execve() 431 memset(phys_2_virt(new_mms->pgd), 0, PAGE_4K_SIZE / 2); in do_execve() 434 …memcpy(phys_2_virt(new_mms->pgd) + 256, phys_2_virt(initial_proc[proc_current_cpu_id]) + 256, PAGE… in do_execve() 827 if (pcb->mm->pgd == NULL) in process_exit_mm() 834 pml4t_t *current_pgd = (pml4t_t *)phys_2_virt(pcb->mm->pgd); in process_exit_mm()
|
/DragonOS-0.1.7/kernel/src/mm/ |
D | utils.c | 16 tmp = phys_2_virt((ul *)(((ul)mm->pgd) & (~0xfffUL)) + ((vaddr >> PAGE_GDT_SHIFT) & 0x1ff)); in __mm_get_paddr()
|
D | mm-types.h | 144 pml4t_t *pgd; // 内存页表指针 member
|
D | mmap.c | 412 …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()
|
D | mm.c | 233 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()
|