Lines Matching full:table

34 /* Returns a reference to a free table */
37 uint64_t *table; in new_table() local
40 /* Look for a free table. */ in new_table()
43 table = &xlat_tables[i * Ln_XLAT_NUM_ENTRIES]; in new_table()
45 MMU_DEBUG("allocating table [%d]%p\n", i, table); in new_table()
46 return table; in new_table()
58 __ASSERT(i < CONFIG_MAX_XLAT_TABLES, "table %p out of range", pte); in table_index()
62 /* Makes a table free for reuse. */
63 static void free_table(uint64_t *table) in free_table() argument
65 unsigned int i = table_index(table); in free_table()
67 MMU_DEBUG("freeing table [%d]%p\n", i, table); in free_table()
68 __ASSERT(xlat_use_count[i] == 1U, "table still in use"); in free_table()
73 static int table_usage(uint64_t *table, int adjustment) in table_usage() argument
75 unsigned int i = table_index(table); in table_usage()
82 static inline bool is_table_unused(uint64_t *table) in is_table_unused() argument
84 return table_usage(table, 0) == 1; in is_table_unused()
143 uint64_t *table = pte_desc_table(*pte); in debug_show_pte() local
145 MMU_DEBUG("[Table] [%d]%p\n", table_index(table), table); in debug_show_pte()
170 static void set_pte_table_desc(uint64_t *pte, uint64_t *table, unsigned int level) in set_pte_table_desc() argument
172 /* Point pte to new table */ in set_pte_table_desc()
173 *pte = PTE_TABLE_DESC | (uint64_t)table; in set_pte_table_desc()
188 uint64_t *table; in expand_to_table() local
192 table = new_table(); in expand_to_table()
193 if (!table) { in expand_to_table()
200 * then we need to reflect that in the new table. in expand_to_table()
205 MMU_DEBUG("expanding PTE 0x%016llx into table [%d]%p\n", in expand_to_table()
206 desc, table_index(table), table); in expand_to_table()
215 table[i] = desc | (i << stride_shift); in expand_to_table()
217 table_usage(table, Ln_XLAT_NUM_ENTRIES); in expand_to_table()
220 * Adjust usage count for parent table's entry in expand_to_table()
226 /* Link the new table in place of the pte it replaces */ in expand_to_table()
227 set_pte_table_desc(pte, table, level); in expand_to_table()
228 table_usage(table, 1); in expand_to_table()
230 return table; in expand_to_table()
239 uint64_t *table = ptables->base_xlat_table; in set_mapping() local
245 "max translation table level exceeded\n"); in set_mapping()
247 /* Locate PTE for given virtual address and page table level */ in set_mapping()
248 pte = &table[XLAT_TABLE_VA_IDX(virt, level)]; in set_mapping()
252 /* Move to the next translation table level */ in set_mapping()
254 table = pte_desc_table(*pte); in set_mapping()
281 table = expand_to_table(pte, level); in set_mapping()
282 if (!table) { in set_mapping()
290 /* Adjust usage count for corresponding table */ in set_mapping()
315 table = ptables->base_xlat_table; in set_mapping()
339 * After the table duplication, each table can be independently in dup_table()
385 /* need to make a private copy of this table */ in privatize_table()
408 * will be duplicated so not to share the same table(s) with src_pt.
433 static void discard_table(uint64_t *table, unsigned int level) in discard_table() argument
438 if (is_table_desc(table[i], level)) { in discard_table()
439 table_usage(pte_desc_table(table[i]), -1); in discard_table()
440 discard_table(pte_desc_table(table[i]), level + 1); in discard_table()
442 if (!is_free_desc(table[i])) { in discard_table()
443 table[i] = 0U; in discard_table()
444 table_usage(table, -1); in discard_table()
447 free_table(table); in discard_table()
465 /* already identical to global table */ in globalize_table()
517 * it global by sharing as much page table content from src_pt as possible,
520 * shared then nothing is done. If page table sharing is not possible then
521 * page table entries in dst_pt are synchronized with those from src_pt.
761 /* setup translation table for zephyr execution regions */ in setup_page_tables()
793 /* Translation table control register settings */
805 * TCR_EL1.EPD1: Disable translation table walk for addresses in get_tcr()
816 * Translation table walk is cacheable, inner/outer WBWA and in get_tcr()