Lines Matching refs:uint64_t

32 static uint64_t xlat_tables[CONFIG_MAX_XLAT_TABLES * Ln_XLAT_NUM_ENTRIES]
33 __aligned(Ln_XLAT_NUM_ENTRIES * sizeof(uint64_t));
42 static uint64_t *new_table(void) in new_table()
44 uint64_t *table; in new_table()
61 static inline unsigned int table_index(uint64_t *pte) in table_index()
70 static int table_usage(uint64_t *table, int adjustment) in table_usage()
92 static inline void inc_table_ref(uint64_t *table) in inc_table_ref()
97 static inline void dec_table_ref(uint64_t *table) in dec_table_ref()
104 static inline bool is_table_unused(uint64_t *table) in is_table_unused()
109 static inline bool is_table_single_referenced(uint64_t *table) in is_table_single_referenced()
143 static inline bool is_free_desc(uint64_t desc) in is_free_desc()
148 static inline bool is_inval_desc(uint64_t desc) in is_inval_desc()
154 static inline bool is_table_desc(uint64_t desc, unsigned int level) in is_table_desc()
160 static inline bool is_block_desc(uint64_t desc) in is_block_desc()
165 static inline uint64_t *pte_desc_table(uint64_t desc) in pte_desc_table()
167 uint64_t address = desc & PTE_PHYSADDR_MASK; in pte_desc_table()
170 return (uint64_t *)address; in pte_desc_table()
173 static inline bool is_desc_block_aligned(uint64_t desc, unsigned int level_size) in is_desc_block_aligned()
185 static inline bool is_desc_superset(uint64_t desc1, uint64_t desc2, in is_desc_superset()
188 uint64_t mask = DESC_ATTRS_MASK | GENMASK64(47, LEVEL_TO_VA_SIZE_SHIFT(level)); in is_desc_superset()
194 static void debug_show_pte(uint64_t *pte, unsigned int level) in debug_show_pte()
207 uint64_t *table = pte_desc_table(*pte); in debug_show_pte()
234 static inline void debug_show_pte(uint64_t *pte, unsigned int level) { } in debug_show_pte()
237 static void set_pte_table_desc(uint64_t *pte, uint64_t *table, unsigned int level) in set_pte_table_desc()
240 *pte = PTE_TABLE_DESC | (uint64_t)table; in set_pte_table_desc()
244 static void set_pte_block_desc(uint64_t *pte, uint64_t desc, unsigned int level) in set_pte_block_desc()
260 static uint64_t *expand_to_table(uint64_t *pte, unsigned int level) in expand_to_table()
262 uint64_t *table; in expand_to_table()
276 uint64_t desc = *pte; in expand_to_table()
306 static int set_mapping(uint64_t *top_table, uintptr_t virt, size_t size, in set_mapping()
307 uint64_t desc, bool may_overwrite) in set_mapping()
309 uint64_t *table = top_table; in set_mapping()
310 uint64_t *pte; in set_mapping()
311 uint64_t level_size; in set_mapping()
378 static void del_mapping(uint64_t *table, uintptr_t virt, size_t size, in del_mapping()
382 uint64_t *pte, *subtable; in del_mapping()
417 static uint64_t *dup_table(uint64_t *src_table, unsigned int level) in dup_table()
419 uint64_t *dst_table = new_table(); in dup_table()
455 static int privatize_table(uint64_t *dst_table, uint64_t *src_table, in privatize_table()
475 uint64_t *dst_subtable = pte_desc_table(dst_table[i]); in privatize_table()
476 uint64_t *src_subtable = pte_desc_table(src_table[i]); in privatize_table()
526 static void discard_table(uint64_t *table, unsigned int level) in discard_table()
533 uint64_t *subtable = pte_desc_table(table[i]); in discard_table()
548 static int globalize_table(uint64_t *dst_table, uint64_t *src_table, in globalize_table()
569 uint64_t *subtable = pte_desc_table(dst_table[i]); in globalize_table()
602 uint64_t *old_table = is_table_desc(dst_table[i], level) ? in globalize_table()
657 static uint64_t get_region_desc(uint32_t attrs) in get_region_desc()
660 uint64_t desc = 0U; in get_region_desc()
741 uint64_t desc = get_region_desc(attrs); in __add_map()
929 static uint64_t get_tcr(int el) in get_tcr()
931 uint64_t tcr; in get_tcr()
932 uint64_t va_bits = CONFIG_ARM64_VA_BITS; in get_tcr()
933 uint64_t tcr_ps_bits; in get_tcr()
964 uint64_t val; in enable_mmu_el1()
969 write_ttbr0_el1((uint64_t)ptables->base_xlat_table); in enable_mmu_el1()
1146 uint64_t par; in arch_page_phys_get()
1192 static uint16_t get_asid(uint64_t ttbr0) in get_asid()
1231 domain_ptables->ttbr0 = (((uint64_t)asid) << TTBR_ASID_SHIFT) | in arch_mem_domain_init()
1232 ((uint64_t)(uintptr_t)domain_ptables->base_xlat_table); in arch_mem_domain_init()
1352 uint64_t curr_ttbr0 = read_ttbr0_el1(); in z_arm64_swap_ptables()
1353 uint64_t new_ttbr0 = ptables->ttbr0; in z_arm64_swap_ptables()
1392 static uint64_t *get_pte_location(struct arm_mmu_ptables *ptables, in get_pte_location()
1395 uint64_t *pte; in get_pte_location()
1396 uint64_t *table = ptables->base_xlat_table; in get_pte_location()
1419 uint64_t *pte = get_pte_location(&kernel_ptables, virt); in arch_mem_page_out()
1420 uint64_t desc; in arch_mem_page_out()
1451 uint64_t *pte = get_pte_location(&kernel_ptables, virt); in arch_mem_page_in()
1452 uint64_t desc; in arch_mem_page_in()
1485 uint64_t *pte = get_pte_location(&kernel_ptables, virt); in arch_page_location_get()
1486 uint64_t desc; in arch_page_location_get()
1515 uint64_t *pte = get_pte_location(&kernel_ptables, virt); in arch_page_info_get()
1516 uint64_t desc; in arch_page_info_get()
1599 bool z_arm64_do_demand_paging(struct arch_esf *esf, uint64_t esr, uint64_t far) in z_arm64_do_demand_paging()
1602 uint64_t *pte, desc; in z_arm64_do_demand_paging()