feat(cactus): validate NPI injection

Cactus SP can now handle the Notification Pending Interrupt:
- Added `npi_handled` array to track the CPUs that have handled the
NPI. The NPI handler will set the index of related to the respective
core.
- Extended and refactored cactus command CACTUS_NOTIFICATION_GET_CMD,
such that the sender can specify that the NPI is to be validated.

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: I2d5728ec4fe2d14fb9ba6f0ba5230ef652467f85
diff --git a/include/runtime_services/cactus_test_cmds.h b/include/runtime_services/cactus_test_cmds.h
index 544dc15..3bb27ed 100644
--- a/include/runtime_services/cactus_test_cmds.h
+++ b/include/runtime_services/cactus_test_cmds.h
@@ -402,10 +402,10 @@
 
 static inline smc_ret_values cactus_notification_get_send_cmd(
 	ffa_id_t source, ffa_id_t dest, ffa_id_t receiver,
-	uint32_t vcpu_id, uint32_t flags)
+	uint32_t vcpu_id, uint32_t flags, bool check_npi_handled)
 {
 	return cactus_send_cmd(source, dest, CACTUS_NOTIFICATION_GET_CMD,
-			       receiver, vcpu_id, 0, flags);
+			       receiver, vcpu_id, check_npi_handled, flags);
 }
 
 static inline uint32_t cactus_notification_get_vcpu(smc_ret_values ret)
@@ -436,6 +436,11 @@
 	return (uint64_t)ret.ret5;
 }
 
+static inline bool cactus_notifications_check_npi_handled(smc_ret_values ret)
+{
+	return (bool)ret.ret6;
+}
+
 /**
  * Request SP to set notifications. The arguments to use in ffa_notification_set
  * are propagated on the command to test erroneous uses of the interface.