Lines Matching refs:virt

287 static inline int get_index(void *virt, int level)  in get_index()  argument
289 return (((uintptr_t)virt >> paging_levels[level].shift) % in get_index()
294 static inline pentry_t *get_entry_ptr(pentry_t *ptables, void *virt, int level) in get_entry_ptr() argument
296 return &ptables[get_index(virt, level)]; in get_entry_ptr()
300 static inline pentry_t get_entry(pentry_t *ptables, void *virt, int level) in get_entry() argument
302 return ptables[get_index(virt, level)]; in get_entry()
368 pentry_t *ptables, void *virt) in pentry_get() argument
373 pentry_t entry = get_entry(table, virt, level); in pentry_get()
588 uintptr_t virt = in print_entries() local
593 if (phys == virt) { in print_entries()
596 } else if (phys + K_MEM_VIRT_OFFSET == virt) { in print_entries()
618 if (phys == virt) { in print_entries()
735 static void dump_entry(int level, void *virt, pentry_t entry) in dump_entry() argument
741 uint8_t *virtmap = (uint8_t *)ROUND_DOWN(virt, get_entry_scope(level)); in dump_entry()
766 void *virt) in z_x86_pentry_get() argument
768 pentry_get(paging_level, val, ptables, virt); in z_x86_pentry_get()
776 void z_x86_dump_mmu_flags(pentry_t *ptables, void *virt) in z_x86_dump_mmu_flags() argument
781 pentry_get(&level, &entry, ptables, virt); in z_x86_dump_mmu_flags()
786 dump_entry(level, virt, entry); in z_x86_dump_mmu_flags()
1004 static int page_map_set(pentry_t *ptables, void *virt, pentry_t entry_val, in page_map_set() argument
1015 index = get_index(virt, level); in page_map_set()
1050 level + 1, virt); in page_map_set()
1058 tlb_flush_page(virt); in page_map_set()
1095 static int range_map_ptables(pentry_t *ptables, void *virt, uintptr_t phys, in range_map_ptables() argument
1119 uint8_t *dest_virt = (uint8_t *)virt + offset; in range_map_ptables()
1167 static int range_map(void *virt, uintptr_t phys, size_t size, in range_map() argument
1173 PRI_ENTRY " opt 0x%x", __func__, phys, virt, size, in range_map()
1181 __ASSERT(((((intptr_t)virt) << 16) >> 16) == (intptr_t)virt, in range_map()
1183 virt, size); in range_map()
1206 ret2 = range_map_ptables(domain->ptables, virt, phys, size, in range_map()
1216 ret2 = range_map_ptables(z_x86_kernel_ptables, virt, phys, size, in range_map()
1234 static inline int range_map_unlocked(void *virt, uintptr_t phys, size_t size, in range_map_unlocked() argument
1242 ret = range_map(virt, phys, size, entry_flags, mask, options); in range_map_unlocked()
1295 void arch_mem_map(void *virt, uintptr_t phys, size_t size, uint32_t flags) in arch_mem_map() argument
1299 ret = range_map_unlocked(virt, phys, size, flags_to_entry(flags), in arch_mem_map()
1444 uint8_t *virt; in arch_buffer_validate() local
1449 (void)k_mem_region_align((uintptr_t *)&virt, &aligned_size, in arch_buffer_validate()
1454 if (!page_validate(ptables, virt + offset, write)) { in arch_buffer_validate()
2067 int arch_page_phys_get(void *virt, uintptr_t *phys) in arch_page_phys_get() argument
2072 __ASSERT(POINTER_TO_UINT(virt) % CONFIG_MMU_PAGE_SIZE == 0U, in arch_page_phys_get()
2073 "unaligned address %p to %s", virt, __func__); in arch_page_phys_get()
2075 pentry_get(&level, &pte, z_x86_page_tables_get(), virt); in arch_page_phys_get()