refactor(hftest): helper to handle commands in message loop
In anticipation of adding support for processing FFA_INTERRUPT
and FFA_RUN, the message loop has been refactored. A helper
function to process commands received through direct request
message has been created.
A new field tracking the source of the direct request message has
been added to hftest_context structure.
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
Change-Id: I64498ff8bc7e2d4fc34e0737b17732c083939c2d
diff --git a/test/hftest/service_common.c b/test/hftest/service_common.c
index 3e8016d..f606bf5 100644
--- a/test/hftest/service_common.c
+++ b/test/hftest/service_common.c
@@ -150,3 +150,15 @@
/* Hang if the service returns. */
}
}
+
+ffa_vm_id_t hftest_get_dir_req_source_id()
+{
+ struct hftest_context *ctx = hftest_get_context();
+ return ctx->dir_req_source_id;
+}
+
+void hftest_set_dir_req_source_id(ffa_vm_id_t id)
+{
+ struct hftest_context *ctx = hftest_get_context();
+ ctx->dir_req_source_id = id;
+}