test(indirect message): add FFA_MSG_SEND2 tests
Add tests for following scenarios:
* FFA_MSG_SEND2 is a supported FFA_FEATURE.
* VM-VM: primary VM sends an indirect message to VM2. Since current
implementation misses receiver notification, VM1 explicitly schedules
VM2 (via FFA_RUN), which reads its RX buffer and echoes it back to
VM1.
* VM-SP, SP-SP, SP-VM: SP testing infrastructure doesn't support
indirect messages yet. For those scenarios the primary VM asks the
sender to send an indirect message to the receiver. Receiver
notification is missing, the sender sends then a direct message to the
receiver, which checks its RX buffer and echoes back the message
payload to the sender.
Change-Id: I699a80cf839a1eac3883fcb7e857a08210160f58
Signed-off-by: Federico Recanati <federico.recanati@arm.com>
diff --git a/test/hftest/sel0_secure_service.c b/test/hftest/sel0_secure_service.c
index 2e2f568..3ea9991 100644
--- a/test/hftest/sel0_secure_service.c
+++ b/test/hftest/sel0_secure_service.c
@@ -16,6 +16,7 @@
#include "vmapi/hf/call.h"
#include "test/hftest.h"
+#include "test/vmapi/ffa.h"
alignas(4096) uint8_t kstack[4096];
@@ -43,6 +44,9 @@
noreturn void kmain(void)
{
+ /* Register RX/TX buffers via FFA_RXTX_MAP */
+ set_up_mailbox();
+
test_main_sp(true);
/* Do not expect to get to this point, so abort. */
diff --git a/test/hftest/sel1_secure_service.c b/test/hftest/sel1_secure_service.c
index cff2f00..76b74e3 100644
--- a/test/hftest/sel1_secure_service.c
+++ b/test/hftest/sel1_secure_service.c
@@ -17,6 +17,7 @@
#include "test/abort.h"
#include "test/hftest.h"
+#include "test/vmapi/ffa.h"
alignas(4096) uint8_t kstack[MAX_CPUS][4096];
@@ -40,6 +41,9 @@
res = ffa_secondary_ep_register((uintptr_t)secondary_ep_entry);
EXPECT_EQ(res.func, FFA_SUCCESS_32);
+ /* Register RX/TX buffers via FFA_RXTX_MAP */
+ set_up_mailbox();
+
test_main_sp(true);
/* Do not expect to get to this point, so abort. */