Lines Matching defs:ctx
158 static int mmap_add_region_check(const xlat_ctx_t *ctx, const mmap_region_t *mm)
177 if (end_pa > ctx->pa_max_address) {
180 /* Check that there is space in the ctx->mmap array */
181 if (ctx->mmap[ctx->mmap_num - 1].size != 0U) {
185 for (const mmap_region_t *mm_cursor = ctx->mmap;
247 void mmap_add_region_ctx(xlat_ctx_t *ctx, const mmap_region_t *mm)
249 mmap_region_t *mm_cursor = ctx->mmap, *mm_destination;
250 const mmap_region_t *mm_end = ctx->mmap + ctx->mmap_num;
262 assert(!ctx->initialized);
264 ret = mmap_add_region_check(ctx, mm);
274 mm_last = ctx->mmap;
300 if (end_pa > ctx->max_pa) {
301 ctx->max_pa = end_pa;
303 if (end_va > ctx->max_va) {
304 ctx->max_va = end_va;
308 void mmap_add_ctx(xlat_ctx_t *ctx, const mmap_region_t *mm)
313 mmap_add_region_ctx(ctx, mm_cursor);
318 void __init init_xlat_tables_ctx(xlat_ctx_t *ctx)
322 assert(ctx != NULL);
323 assert(!ctx->initialized);
324 assert((ctx->xlat_regime == EL2_REGIME) ||
325 (ctx->xlat_regime == EL1_EL0_REGIME));
327 assert(!is_mpu_enabled_ctx(ctx));
329 mmap_region_t *mm = ctx->mmap;
331 assert(ctx->va_max_address >=
333 assert(ctx->va_max_address <= (MAX_VIRT_ADDR_SPACE_SIZE - 1U));
334 assert(IS_POWER_OF_TWO(ctx->va_max_address + 1U));
340 for (unsigned int i = 0U; i < ctx->base_table_entries; i++)
341 ctx->base_table[i] = INVALID_DESC;
364 ctx->initialized = true;
366 xlat_tables_print(ctx);