Lines Matching full:a0

32 typedef void (*smc_cb_t)(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3,
40 uint32_t a0; member
54 void arm_smccc_smc(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3, in arm_smccc_smc() argument
58 if (a0 == OPTEE_SMC_CALLS_UID) { in arm_smccc_smc()
59 res->a0 = OPTEE_MSG_UID_0; in arm_smccc_smc()
66 if (a0 == OPTEE_SMC_EXCHANGE_CAPABILITIES) { in arm_smccc_smc()
70 if (a0 == OPTEE_SMC_GET_THREAD_COUNT) { in arm_smccc_smc()
75 t_call.smc_cb(a0, a1, a2, a3, a4, a5, a6, a7, res); in arm_smccc_smc()
78 wait_call.smc_cb(a0, a1, a2, a3, a4, a5, a6, a7, res); in arm_smccc_smc()
81 send_call.smc_cb(a0, a1, a2, a3, a4, a5, a6, a7, res); in arm_smccc_smc()
86 void arm_smccc_hvc(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3, in arm_smccc_hvc() argument
114 void fast_call(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3, in fast_call() argument
118 t_call.a0 = a0; in fast_call()
127 res->a0 = OPTEE_SMC_RETURN_OK; in fast_call()
130 void fail_call(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3, in fail_call() argument
134 res->a0 = OPTEE_SMC_RETURN_EBUSY; in fail_call()
249 void normal_call(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3, in normal_call() argument
253 t_call.a0 = a0; in normal_call()
264 res->a0 = OPTEE_SMC_RETURN_RPC_PREFIX | OPTEE_SMC_RPC_FUNC_ALLOC; in normal_call()
272 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in normal_call()
273 res->a0 = OPTEE_SMC_RETURN_RPC_PREFIX | OPTEE_SMC_RPC_FUNC_FREE; in normal_call()
281 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in normal_call()
282 res->a0 = OPTEE_SMC_RETURN_RPC_PREFIX | OPTEE_SMC_RPC_FUNC_FOREIGN_INTR; in normal_call()
285 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in normal_call()
286 res->a0 = OPTEE_SMC_RETURN_OK; in normal_call()
386 void cmd_alloc_free_call(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3, in cmd_alloc_free_call() argument
393 t_call.a0 = a0; in cmd_alloc_free_call()
410 res->a0 = OPTEE_SMC_RETURN_RPC_PREFIX | OPTEE_SMC_RPC_FUNC_ALLOC; in cmd_alloc_free_call()
414 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_alloc_free_call()
415 res->a0 = OPTEE_SMC_RETURN_RPC_PREFIX | OPTEE_SMC_RPC_FUNC_CMD; in cmd_alloc_free_call()
427 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_alloc_free_call()
428 res->a0 = OPTEE_SMC_RETURN_RPC_PREFIX | OPTEE_SMC_RPC_FUNC_CMD; in cmd_alloc_free_call()
440 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_alloc_free_call()
442 res->a0 = OPTEE_SMC_RETURN_RPC_PREFIX | OPTEE_SMC_RPC_FUNC_FREE; in cmd_alloc_free_call()
445 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_alloc_free_call()
446 res->a0 = OPTEE_SMC_RETURN_OK; in cmd_alloc_free_call()
449 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_alloc_free_call()
450 res->a0 = OPTEE_SMC_RETURN_OK; in cmd_alloc_free_call()
501 void cmd_rpc_call(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3, in cmd_rpc_call() argument
508 t_call.a0 = a0; in cmd_rpc_call()
525 res->a0 = OPTEE_SMC_RETURN_RPC_PREFIX | OPTEE_SMC_RPC_FUNC_ALLOC; in cmd_rpc_call()
529 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_rpc_call()
530 res->a0 = OPTEE_SMC_RETURN_RPC_PREFIX | OPTEE_SMC_RPC_FUNC_CMD; in cmd_rpc_call()
543 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_rpc_call()
552 res->a0 = OPTEE_SMC_RETURN_OK; in cmd_rpc_call()
555 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_rpc_call()
556 res->a0 = OPTEE_SMC_RETURN_OK; in cmd_rpc_call()
644 void cmd_shm_alloc_appl(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3, in cmd_shm_alloc_appl() argument
651 t_call.a0 = a0; in cmd_shm_alloc_appl()
668 res->a0 = OPTEE_SMC_RETURN_RPC_PREFIX | OPTEE_SMC_RPC_FUNC_ALLOC; in cmd_shm_alloc_appl()
672 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_shm_alloc_appl()
673 res->a0 = OPTEE_SMC_RETURN_RPC_PREFIX | OPTEE_SMC_RPC_FUNC_CMD; in cmd_shm_alloc_appl()
685 res->a0 = OPTEE_SMC_RETURN_OK; in cmd_shm_alloc_appl()
688 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_shm_alloc_appl()
689 res->a0 = OPTEE_SMC_RETURN_RPC_PREFIX | OPTEE_SMC_RPC_FUNC_CMD; in cmd_shm_alloc_appl()
701 res->a0 = OPTEE_SMC_RETURN_OK; in cmd_shm_alloc_appl()
704 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_shm_alloc_appl()
705 res->a0 = OPTEE_SMC_RETURN_OK; in cmd_shm_alloc_appl()
708 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_shm_alloc_appl()
709 res->a0 = OPTEE_SMC_RETURN_OK; in cmd_shm_alloc_appl()
822 void cmd_gettime_call(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3, in cmd_gettime_call() argument
837 res->a0 = OPTEE_SMC_RETURN_RPC_PREFIX | OPTEE_SMC_RPC_FUNC_ALLOC; in cmd_gettime_call()
841 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_gettime_call()
842 res->a0 = OPTEE_SMC_RETURN_RPC_PREFIX | OPTEE_SMC_RPC_FUNC_CMD; in cmd_gettime_call()
852 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_gettime_call()
853 res->a0 = OPTEE_SMC_RETURN_RPC_PREFIX | OPTEE_SMC_RPC_FUNC_FREE; in cmd_gettime_call()
862 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_gettime_call()
863 res->a0 = OPTEE_SMC_RETURN_OK; in cmd_gettime_call()
866 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_gettime_call()
867 res->a0 = OPTEE_SMC_RETURN_OK; in cmd_gettime_call()
922 void cmd_suspend_call(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3, in cmd_suspend_call() argument
937 res->a0 = OPTEE_SMC_RETURN_RPC_PREFIX | OPTEE_SMC_RPC_FUNC_ALLOC; in cmd_suspend_call()
941 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_suspend_call()
942 res->a0 = OPTEE_SMC_RETURN_RPC_PREFIX | OPTEE_SMC_RPC_FUNC_CMD; in cmd_suspend_call()
947 arg->params[0].u.value.a = t_call.a0; in cmd_suspend_call()
953 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_suspend_call()
954 res->a0 = OPTEE_SMC_RETURN_RPC_PREFIX | OPTEE_SMC_RPC_FUNC_FREE; in cmd_suspend_call()
963 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_suspend_call()
964 res->a0 = OPTEE_SMC_RETURN_OK; in cmd_suspend_call()
967 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_suspend_call()
968 res->a0 = OPTEE_SMC_RETURN_OK; in cmd_suspend_call()
998 t_call.a0 = 4000; /* Set timeout 4000 ms */ in ZTEST()
1014 void cmd_notify_alloc_call(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3, in cmd_notify_alloc_call() argument
1026 res->a0 = OPTEE_SMC_RETURN_RPC_PREFIX | OPTEE_SMC_RPC_FUNC_ALLOC; in cmd_notify_alloc_call()
1030 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_notify_alloc_call()
1031 res->a0 = OPTEE_SMC_RETURN_OK; in cmd_notify_alloc_call()
1037 zassert_equal(a0, 0x32000004, "%s failed with ret %lx", __func__, a0); in cmd_notify_alloc_call()
1038 res->a0 = OPTEE_SMC_RETURN_OK; in cmd_notify_alloc_call()
1044 void cmd_notify_free_call(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3, in cmd_notify_free_call() argument
1056 zassert_equal(a0, 0x32000004, "%s failed with ret %lx", __func__, a0); in cmd_notify_free_call()
1058 res->a0 = OPTEE_SMC_RETURN_RPC_PREFIX | OPTEE_SMC_RPC_FUNC_FREE; in cmd_notify_free_call()
1061 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_notify_free_call()
1062 res->a0 = OPTEE_SMC_RETURN_OK; in cmd_notify_free_call()
1067 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_notify_free_call()
1068 res->a0 = OPTEE_SMC_RETURN_OK; in cmd_notify_free_call()
1077 void cmd_notify_wait_call(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3, in cmd_notify_wait_call() argument
1092 zassert_equal(a0, 0x32000004, "%s failed with ret %lx", __func__, a0); in cmd_notify_wait_call()
1093 res->a0 = OPTEE_SMC_RETURN_RPC_PREFIX | OPTEE_SMC_RPC_FUNC_CMD; in cmd_notify_wait_call()
1100 arg->params[0].u.value.b = wait_call.a0; /* Set notification key */ in cmd_notify_wait_call()
1104 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_notify_wait_call()
1105 res->a0 = OPTEE_SMC_RETURN_OK; in cmd_notify_wait_call()
1112 void cmd_notify_send_call(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3, in cmd_notify_send_call() argument
1127 zassert_equal(a0, 0x32000004, "%s failed with ret %lx", __func__, a0); in cmd_notify_send_call()
1128 res->a0 = OPTEE_SMC_RETURN_RPC_PREFIX | OPTEE_SMC_RPC_FUNC_CMD; in cmd_notify_send_call()
1135 arg->params[0].u.value.b = send_call.a0; /* Set notification key */ in cmd_notify_send_call()
1139 zassert_equal(a0, 0x32000003, "%s failed with ret %lx", __func__, a0); in cmd_notify_send_call()
1140 res->a0 = OPTEE_SMC_RETURN_OK; in cmd_notify_send_call()
1167 /* This expects wait_call.a0 to be set as key and wait_call.a4 as session_id */ in wait_handler()
1189 wait_call.a0 = key; in do_wait()
1231 send_call.a0 = 1; /* key */ in ZTEST()
1244 send_call.a0 = 2; /* key */ in ZTEST()
1254 wait_call.a0 = 2; /* key */ in ZTEST()