static void main_tee_entry_fast(struct thread_smc_args *args) { /* TODO move to main_init() */ if (init_teecore() != TEE_SUCCESS) panic(); /* SiP Service Call Count */ if (args->a0 == TEESMC32_SIP_SUNXI_CALLS_COUNT) { args->a0 = 1; return; } /* SiP Service Call UID */ if (args->a0 == TEESMC32_SIP_SUNXI_CALLS_UID) { args->a0 = TEESMC_SIP_SUNXI_UID_R0; args->a1 = TEESMC_SIP_SUNXI_UID_R1; args->a2 = TEESMC_SIP_SUNXI_UID_R2; args->a3 = TEESMC_SIP_SUNXI_UID_R3; return; } /* SiP Service Calls */ if (args->a0 == TEESMC32_OPTEE_FAST_CALL_SIP_SUNXI) { platform_smc_handle(args); return; } tee_entry_fast(args); }
static void platform_tee_entry_fast(struct thread_smc_args *args) { #ifdef CFG_BOOT_SECONDARY_REQUEST if (args->a0 == OPTEE_SMC_BOOT_SECONDARY) { args->a0 = platform_smp_boot(args->a1, (uint32_t)(args->a3)); return; } #endif /* CFG_BOOT_SECONDARY_REQUEST */ tee_entry_fast(args); }