feat(cactus): count requests received

Message loop counts the amount of requests received in each core. The
counting can be accessed through newly added test command
CACTUS_GET_REQ_COUNT_CMD.
Added such special command to be able to test delay Schedule Receiver
Interrupt, in the context of the notifications feature.

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: Id0a5a9cf58e10d1221a1a0f0af6264474fe7e020
diff --git a/include/common/test_helpers.h b/include/common/test_helpers.h
index 9031b34..eaea72c 100644
--- a/include/common/test_helpers.h
+++ b/include/common/test_helpers.h
@@ -9,8 +9,8 @@
 
 #include <arch_features.h>
 #include <ffa_svc.h>
-#include <plat_topology.h>
 #include <events.h>
+#include <plat_topology.h>
 #include <psci.h>
 #include <spm_common.h>
 #include <tftf_lib.h>
diff --git a/include/runtime_services/cactus_test_cmds.h b/include/runtime_services/cactus_test_cmds.h
index d4cf407..b4fb73f 100644
--- a/include/runtime_services/cactus_test_cmds.h
+++ b/include/runtime_services/cactus_test_cmds.h
@@ -471,4 +471,23 @@
 	return (uint32_t)ret.ret4;
 }
 
+/**
+ * Request SP to return the current count of handled requests.
+ *
+ * The command id is the hex representation of the string "getnot".
+ */
+#define CACTUS_GET_REQ_COUNT_CMD U(0x726571636f756e74)
+
+static inline smc_ret_values cactus_get_req_count_send_cmd(
+	ffa_id_t source, ffa_id_t dest)
+{
+	return cactus_send_cmd(source, dest, CACTUS_GET_REQ_COUNT_CMD, 0, 0, 0,
+			       0);
+}
+
+static inline uint32_t cactus_get_req_count(smc_ret_values ret)
+{
+	return (uint32_t)ret.ret4;
+}
+
 #endif