Lines Matching refs:uint64_t

7 extern uint64_t mm_total_2M_pages;
27 static void mm_calculate_entry_num(uint64_t length, mm_pgt_entry_num_t *ent) in mm_calculate_entry_num()
48 uint64_t global_CR3 = (uint64_t)get_CR3(); in mm_map_phys_addr()
55 uint64_t global_CR3 = (uint64_t)get_CR3(); in mm_map_phys_addr_user()
79 uint64_t length_mapped = 0; in mm_map_proc_page_table()
87 uint64_t pml4e_id = ((virt_addr_start >> PAGE_GDT_SHIFT) & 0x1ff); in mm_map_proc_page_table()
88 uint64_t *pml4_ptr; in mm_map_proc_page_table()
110 uint64_t pdpte_id = (((virt_addr_start + length_mapped) >> PAGE_1G_SHIFT) & 0x1ff); in mm_map_proc_page_table()
111 uint64_t *pdpt_ptr = (uint64_t *)phys_2_virt(*pml4e_ptr & (~0xfffUL)); in mm_map_proc_page_table()
117 uint64_t *pdpte_ptr = (pdpt_ptr + pdpte_id); in mm_map_proc_page_table()
127 uint64_t pde_id = (((virt_addr_start + length_mapped) >> PAGE_2M_SHIFT) & 0x1ff); in mm_map_proc_page_table()
128 uint64_t *pd_ptr = (uint64_t *)phys_2_virt(*pdpte_ptr & (~0xfffUL)); in mm_map_proc_page_table()
143 uint64_t *vaddr = kmalloc(PAGE_4K_SIZE, 0); in mm_map_proc_page_table()
153uint64_t pte_id = (((virt_addr_start + length_mapped) >> PAGE_4K_SHIFT) & 0x1ff); in mm_map_proc_page_table()
154 uint64_t *pt_ptr = (uint64_t *)phys_2_virt(*pde_ptr & (~0xfffUL)); in mm_map_proc_page_table()
160 uint64_t *pte_ptr = pt_ptr + pte_id; in mm_map_proc_page_table()
210 uint64_t length_unmapped = 0; in mm_unmap_proc_table()
212 uint64_t pml4e_id = ((virt_addr_start >> PAGE_GDT_SHIFT) & 0x1ff); in mm_unmap_proc_table()
213 uint64_t *pml4_ptr; in mm_unmap_proc_table()
234 uint64_t pdpte_id = (((virt_addr_start + length_unmapped) >> PAGE_1G_SHIFT) & 0x1ff); in mm_unmap_proc_table()
235 uint64_t *pdpt_ptr = (uint64_t *)phys_2_virt(*pml4e_ptr & (~0xfffUL)); in mm_unmap_proc_table()
242 uint64_t *pdpte_ptr = (pdpt_ptr + pdpte_id); in mm_unmap_proc_table()
251 uint64_t pde_id = (((virt_addr_start + length_unmapped) >> PAGE_2M_SHIFT) & 0x1ff); in mm_unmap_proc_table()
252 uint64_t *pd_ptr = (uint64_t *)phys_2_virt(*pdpte_ptr & (~0xfffUL)); in mm_unmap_proc_table()
266uint64_t pte_id = (((virt_addr_start + length_unmapped) >> PAGE_4K_SHIFT) & 0x1ff); in mm_unmap_proc_table()
267 uint64_t *pt_ptr = (uint64_t *)phys_2_virt(*pde_ptr & (~0xfffUL)); in mm_unmap_proc_table()
271 uint64_t *pte_ptr = pt_ptr + pte_id; in mm_unmap_proc_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()
360 int mm_map_vma(struct vm_area_struct *vma, uint64_t paddr, uint64_t offset, uint64_t length) in mm_map_vma()
363 uint64_t mapped = 0; in mm_map_vma()
368 uint64_t page_flags = 0; in mm_map_vma()
399 uint64_t len_4k, len_2m; in mm_map_vma()
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()
473 int mm_map(struct mm_struct *mm, uint64_t vaddr, uint64_t length, uint64_t paddr) in mm_map()
476 uint64_t offset = 0; in mm_map()
477 for (uint64_t mapped = 0; mapped < length;) in mm_map()
494 uint64_t m_len = vma->vm_end - vma->vm_start - offset; in mm_map()
516 int mm_unmap_vma(struct mm_struct *mm, struct vm_area_struct *vma, uint64_t *paddr) in mm_unmap_vma()
528 mm_unmap_proc_table((uint64_t)mm->pgd, true, vma->vm_start, vma->vm_end - vma->vm_start); in mm_unmap_vma()
550 int mm_unmap(struct mm_struct *mm, uint64_t vaddr, uint64_t length, bool destroy) in mm_unmap()
553 for (uint64_t unmapped = 0; unmapped < length;) in mm_unmap()