aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--deployments/attestation/opteesp/attestation_sp.c18
-rw-r--r--deployments/env-test/opteesp/env_test.c18
2 files changed, 16 insertions, 20 deletions
diff --git a/deployments/attestation/opteesp/attestation_sp.c b/deployments/attestation/opteesp/attestation_sp.c
index f597e7e..c891f4d 100644
--- a/deployments/attestation/opteesp/attestation_sp.c
+++ b/deployments/attestation/opteesp/attestation_sp.c
@@ -37,7 +37,7 @@ void __noreturn sp_main(struct ffa_init_info *init_info)
struct attest_provider attest_provider;
struct rpc_interface *attest_iface;
struct ffa_call_ep ffarpc_call_ep;
- struct ffa_direct_msg req_msg;
+ struct sp_msg req_msg;
/* Claim source objects */
struct claim_source *claim_source;
@@ -90,20 +90,18 @@ void __noreturn sp_main(struct ffa_init_info *init_info)
/*********************************************************
* End of boot phase
*********************************************************/
- ffa_msg_wait(&req_msg);
+ sp_msg_wait(&req_msg);
while (1) {
- if (req_msg.function_id == FFA_MSG_SEND_DIRECT_REQ_32) {
- struct ffa_direct_msg resp_msg;
+ struct sp_msg resp_msg;
- ffa_call_ep_receive(&ffarpc_call_ep, &req_msg, &resp_msg);
+ ffa_call_ep_receive(&ffarpc_call_ep, &req_msg, &resp_msg);
- ffa_msg_send_direct_resp(req_msg.destination_id,
- req_msg.source_id, resp_msg.args[0], resp_msg.args[1],
- resp_msg.args[2], resp_msg.args[3], resp_msg.args[4],
- &req_msg);
- }
+ resp_msg.source_id = req_msg.destination_id;
+ resp_msg.destination_id = req_msg.source_id;
+
+ sp_msg_send_direct_resp(&resp_msg, &req_msg);
}
fatal_error:
diff --git a/deployments/env-test/opteesp/env_test.c b/deployments/env-test/opteesp/env_test.c
index ff2f8df..78c439f 100644
--- a/deployments/env-test/opteesp/env_test.c
+++ b/deployments/env-test/opteesp/env_test.c
@@ -28,7 +28,7 @@ void __noreturn sp_main(struct ffa_init_info *init_info)
struct ffa_call_ep ffarpc_call_ep;
struct rpc_interface *test_runner_iface;
struct ffarpc_caller ffarpc_caller;
- struct ffa_direct_msg req_msg;
+ struct sp_msg req_msg;
/* Boot */
if (sp_init(&own_id) != 0) goto fatal_error;
@@ -47,20 +47,18 @@ void __noreturn sp_main(struct ffa_init_info *init_info)
ffa_call_ep_init(&ffarpc_call_ep, test_runner_iface);
/* End of boot phase */
- ffa_msg_wait(&req_msg);
+ sp_msg_wait(&req_msg);
while (1) {
- if (req_msg.function_id == FFA_MSG_SEND_DIRECT_REQ_32) {
- struct ffa_direct_msg resp_msg;
+ struct sp_msg resp_msg;
- ffa_call_ep_receive(&ffarpc_call_ep, &req_msg, &resp_msg);
+ ffa_call_ep_receive(&ffarpc_call_ep, &req_msg, &resp_msg);
- ffa_msg_send_direct_resp(req_msg.destination_id,
- req_msg.source_id, resp_msg.args[0], resp_msg.args[1],
- resp_msg.args[2], resp_msg.args[3], resp_msg.args[4],
- &req_msg);
- }
+ resp_msg.source_id = req_msg.destination_id;
+ resp_msg.destination_id = req_msg.source_id;
+
+ sp_msg_send_direct_resp(&resp_msg, &req_msg);
}
fatal_error: