Пример #1
0
void tee_mmu_set_ctx(struct tee_ta_ctx *ctx)
{
	if (!ctx) {
		core_mmu_set_user_map(NULL);
	} else {
		struct core_mmu_user_map map;

		core_mmu_create_user_map(ctx->mmu, ctx->context, &map);
		core_mmu_set_user_map(&map);
	}
}
Пример #2
0
void tee_mmu_set_ctx(struct tee_ta_ctx *ctx)
{
	if (!ctx || !is_user_ta_ctx(ctx)) {
		core_mmu_set_user_map(NULL);
	} else {
		struct core_mmu_user_map map;
		struct user_ta_ctx *utc = to_user_ta_ctx(ctx);

		core_mmu_create_user_map(utc->mmu, utc->context, &map);
		core_mmu_set_user_map(&map);
	}
}
Пример #3
0
void tee_mmu_set_ctx(struct tee_ta_ctx *ctx)
{
	if (!ctx || !is_user_ta_ctx(ctx)) {
		core_mmu_set_user_map(NULL);
#ifdef CFG_SMALL_PAGE_USER_TA
		/*
		 * We're not needing the user page tables for the moment,
		 * release them as some other thread may be waiting for
		 * them.
		 */
		pgt_free(&thread_get_tsd()->pgt_cache);
#endif
	} else {
		struct core_mmu_user_map map;
		struct user_ta_ctx *utc = to_user_ta_ctx(ctx);

		core_mmu_create_user_map(utc->mmu, utc->context, &map);
		core_mmu_set_user_map(&map);
	}
	thread_get_tsd()->ctx = ctx;
}