示例#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);
	}
}