test(interrupts): hint fwd destination SP could be interrupted
TFTF can send a hint to the destination SP to expect that the
forwarded sleep command could be preempted by a non-secure interrupt.
This can make the tests exercising SP's response to non-secure
interrupt robust by allowing the destination SP to check if the
forward destination SP has indeed been preempted.
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
Change-Id: I808ee6c63687438d0092a53389f11bf9b3dd532d
diff --git a/include/runtime_services/cactus_test_cmds.h b/include/runtime_services/cactus_test_cmds.h
index d86aa61..bbf0187 100644
--- a/include/runtime_services/cactus_test_cmds.h
+++ b/include/runtime_services/cactus_test_cmds.h
@@ -301,15 +301,17 @@
*
* The sender of this command expects to receive CACTUS_SUCCESS if the requested
* echo interaction happened successfully, or CACTUS_ERROR otherwise.
+ * Moreover, the sender can send a hint to the destination SP to expect that
+ * the forwaded sleep command could be preempted by a non-secure interrupt.
*/
#define CACTUS_FWD_SLEEP_CMD (CACTUS_SLEEP_CMD + 1)
static inline struct ffa_value cactus_fwd_sleep_cmd(
ffa_id_t source, ffa_id_t dest, ffa_id_t fwd_dest,
- uint32_t sleep_time)
+ uint32_t sleep_time, bool hint_interrupted)
{
return cactus_send_cmd(source, dest, CACTUS_FWD_SLEEP_CMD, sleep_time,
- fwd_dest, 0, 0);
+ fwd_dest, hint_interrupted, 0);
}
static inline uint32_t cactus_get_sleep_time(struct ffa_value ret)
@@ -322,6 +324,11 @@
return (ffa_id_t)ret.arg5;
}
+static inline bool cactus_get_fwd_sleep_interrupted_hint(struct ffa_value ret)
+{
+ return (bool)ret.arg6;
+}
+
/**
* Command to request cactus to sleep for half the given time in ms, trigger
* trusted watchdog timer and then sleep again for another half the given time.