コード例 #1
0
ファイル: sm.c プロジェクト: nahanfly/optee_os
void sm_set_sec_smc_entry(const struct sm_reg_r0_to_r3 *regs)
{
	struct sm_sec_ctx *sec_ctx = sm_get_sec_ctx();

	if (TEESMC_IS_FAST_CALL(regs->r0))
		sec_ctx->mon_lr = (uint32_t)&sm_entry_vector->fast_smc_entry;
	else
		sec_ctx->mon_lr = (uint32_t)&sm_entry_vector->std_smc_entry;
}
コード例 #2
0
ファイル: thread.c プロジェクト: gxliu/optee_os
void thread_handle_smc_call(struct thread_smc_args *args)
{
	check_canaries();

	if (TEESMC_IS_FAST_CALL(args->a0)) {
		thread_fastcall_handler_ptr(args);
	} else {
		if (args->a0 == TEESMC32_CALL_RETURN_FROM_RPC)
			thread_resume_from_rpc(args);
		else
			thread_alloc_and_run(args);
	}
}