aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ-Alves <joao.alves@arm.com>2021-02-11 10:40:35 +0000
committerJ-Alves <joao.alves@arm.com>2021-03-11 09:29:16 +0000
commit035b7d06c41d2eaf69ea86b1b23ee9fedddc4187 (patch)
tree36887af473ea42c0d01479ccbf9a08417f9ae363
parenteb426de964d74d12d7fe85edb448430753819fda (diff)
downloadtf-a-tests-035b7d06c41d2eaf69ea86b1b23ee9fedddc4187.tar.gz
FF-A: FFA_MSG_DIRECT_RESP call using 5 registers
Signed-off-by: J-Alves <joao.alves@arm.com> Change-Id: I69c012221743077c962f8099d824ea9452a1df22
-rw-r--r--include/runtime_services/ffa_helpers.h8
-rw-r--r--tftf/tests/runtime_services/secure_service/ffa_helpers.c25
2 files changed, 29 insertions, 4 deletions
diff --git a/include/runtime_services/ffa_helpers.h b/include/runtime_services/ffa_helpers.h
index 02a956e8..2422abbf 100644
--- a/include/runtime_services/ffa_helpers.h
+++ b/include/runtime_services/ffa_helpers.h
@@ -388,6 +388,14 @@ smc_ret_values ffa_msg_send_direct_req64_5args(uint32_t source_id, uint32_t dest
uint64_t arg2, uint64_t arg3,
uint64_t arg4);
+smc_ret_values ffa_msg_send_direct_resp64_5args(ffa_vm_id_t source_id,
+ ffa_vm_id_t dest_id,
+ uint64_t arg0,
+ uint64_t arg1,
+ uint64_t arg2,
+ uint64_t arg3,
+ uint64_t arg4);
+
smc_ret_values ffa_run(uint32_t dest_id, uint32_t vcpu_id);
smc_ret_values ffa_version(uint32_t input_version);
smc_ret_values ffa_id_get(void);
diff --git a/tftf/tests/runtime_services/secure_service/ffa_helpers.c b/tftf/tests/runtime_services/secure_service/ffa_helpers.c
index 923ee2c9..f3da55f5 100644
--- a/tftf/tests/runtime_services/secure_service/ffa_helpers.c
+++ b/tftf/tests/runtime_services/secure_service/ffa_helpers.c
@@ -389,13 +389,30 @@ smc_ret_values ffa_msg_wait(void)
}
smc_ret_values ffa_msg_send_direct_resp(ffa_vm_id_t source_id,
+ ffa_vm_id_t dest_id,
+ uint32_t message)
+{
+ return ffa_msg_send_direct_resp64_5args(source_id, dest_id, message,
+ 0, 0, 0, 0);
+}
+
+smc_ret_values ffa_msg_send_direct_resp64_5args(ffa_vm_id_t source_id,
ffa_vm_id_t dest_id,
- uint32_t message)
+ uint64_t arg0,
+ uint64_t arg1,
+ uint64_t arg2,
+ uint64_t arg3,
+ uint64_t arg4)
{
smc_args args = {
- .fid = FFA_MSG_SEND_DIRECT_RESP_SMC32,
- .arg1 = ((uint32_t)source_id << 16) | dest_id,
- .arg3 = message
+ .fid = FFA_MSG_SEND_DIRECT_RESP_SMC64,
+ .arg1 = (source_id << 16) | (dest_id),
+ .arg2 = 0,
+ .arg3 = arg0,
+ .arg4 = arg1,
+ .arg5 = arg2,
+ .arg6 = arg3,
+ .arg7 = arg4,
};
return tftf_smc(&args);