Lines Matching refs:ctx
31 void xlat_tables_print(__unused xlat_ctx_t *ctx) in xlat_tables_print() argument
53 static void xlat_desc_print(const xlat_ctx_t *ctx, uint64_t desc) in xlat_desc_print() argument
56 int xlat_regime = ctx->xlat_regime; in xlat_desc_print()
139 static void xlat_tables_print_internal(xlat_ctx_t *ctx, uintptr_t table_base_va, in xlat_tables_print_internal() argument
199 xlat_tables_print_internal(ctx, table_idx_va, in xlat_tables_print_internal()
207 xlat_desc_print(ctx, desc); in xlat_tables_print_internal()
222 void xlat_tables_print(xlat_ctx_t *ctx) in xlat_tables_print() argument
227 if (ctx->xlat_regime == EL1_EL0_REGIME) { in xlat_tables_print()
229 } else if (ctx->xlat_regime == EL2_REGIME) { in xlat_tables_print()
232 assert(ctx->xlat_regime == EL3_REGIME); in xlat_tables_print()
237 VERBOSE(" Max allowed PA: 0x%llx\n", ctx->pa_max_address); in xlat_tables_print()
238 VERBOSE(" Max allowed VA: 0x%lx\n", ctx->va_max_address); in xlat_tables_print()
239 VERBOSE(" Max mapped PA: 0x%llx\n", ctx->max_pa); in xlat_tables_print()
240 VERBOSE(" Max mapped VA: 0x%lx\n", ctx->max_va); in xlat_tables_print()
242 VERBOSE(" Initial lookup level: %u\n", ctx->base_level); in xlat_tables_print()
244 ctx->base_table_entries); in xlat_tables_print()
248 for (int i = 0; i < ctx->tables_num; ++i) { in xlat_tables_print()
249 if (ctx->tables_mapped_regions[i] != 0) in xlat_tables_print()
253 used_page_tables = ctx->next_table; in xlat_tables_print()
256 used_page_tables, ctx->tables_num, in xlat_tables_print()
257 ctx->tables_num - used_page_tables); in xlat_tables_print()
259 xlat_tables_print_internal(ctx, 0U, ctx->base_table, in xlat_tables_print()
260 ctx->base_table_entries, ctx->base_level); in xlat_tables_print()
345 static int xlat_get_mem_attributes_internal(const xlat_ctx_t *ctx, in xlat_get_mem_attributes_internal() argument
357 assert(ctx != NULL); in xlat_get_mem_attributes_internal()
358 assert(ctx->initialized); in xlat_get_mem_attributes_internal()
359 assert((ctx->xlat_regime == EL1_EL0_REGIME) || in xlat_get_mem_attributes_internal()
360 (ctx->xlat_regime == EL2_REGIME) || in xlat_get_mem_attributes_internal()
361 (ctx->xlat_regime == EL3_REGIME)); in xlat_get_mem_attributes_internal()
363 virt_addr_space_size = (unsigned long long)ctx->va_max_address + 1ULL; in xlat_get_mem_attributes_internal()
367 ctx->base_table, in xlat_get_mem_attributes_internal()
368 ctx->base_table_entries, in xlat_get_mem_attributes_internal()
392 xlat_desc_print(ctx, desc); in xlat_get_mem_attributes_internal()
415 if (ctx->xlat_regime == EL1_EL0_REGIME) { in xlat_get_mem_attributes_internal()
427 uint64_t xn_mask = xlat_arch_regime_get_xn_desc(ctx->xlat_regime); in xlat_get_mem_attributes_internal()
439 int xlat_get_mem_attributes_ctx(const xlat_ctx_t *ctx, uintptr_t base_va, in xlat_get_mem_attributes_ctx() argument
442 return xlat_get_mem_attributes_internal(ctx, base_va, attr, in xlat_get_mem_attributes_ctx()
447 int xlat_change_mem_attributes_ctx(const xlat_ctx_t *ctx, uintptr_t base_va, in xlat_change_mem_attributes_ctx() argument
452 assert(ctx != NULL); in xlat_change_mem_attributes_ctx()
453 assert(ctx->initialized); in xlat_change_mem_attributes_ctx()
456 (unsigned long long)ctx->va_max_address + 1U; in xlat_change_mem_attributes_ctx()
498 ctx->base_table, in xlat_change_mem_attributes_ctx()
499 ctx->base_table_entries, in xlat_change_mem_attributes_ctx()
547 (void) xlat_get_mem_attributes_internal(ctx, base_va, &old_attr, in xlat_change_mem_attributes_ctx()
575 xlat_arch_tlbi_va(base_va, ctx->xlat_regime); in xlat_change_mem_attributes_ctx()
581 *entry = xlat_desc(ctx, new_attr, addr_pa, level); in xlat_change_mem_attributes_ctx()