feat(notifications): notifications set and get
Handle FF-A calls FFA_NOTIFICATION_SET and FFA_NOTIFICATION_GET.
The former is used for a sender to signal a notification to the
receiver; the latter is for the receiver to get whichever notifications
there are pending.
Change-Id: I7e9db94201d0d78ceecd599cd350eeb37a8cb1f8
Signed-off-by: J-Alves <joao.alves@arm.com>
diff --git a/inc/vmapi/hf/ffa.h b/inc/vmapi/hf/ffa.h
index af2b756..6f2dd27 100644
--- a/inc/vmapi/hf/ffa.h
+++ b/inc/vmapi/hf/ffa.h
@@ -417,6 +417,24 @@
}
/**
+ * Flags used in calls to FFA_NOTIFICATION_GET interface.
+ */
+#define FFA_NOTIFICATION_FLAG_BITMAP_SP UINT32_C(0x1 << 0)
+#define FFA_NOTIFICATION_FLAG_BITMAP_VM UINT32_C(0x1 << 1)
+#define FFA_NOTIFICATION_FLAG_BITMAP_SPM UINT32_C(0x1 << 2)
+#define FFA_NOTIFICATION_FLAG_BITMAP_HYP UINT32_C(0x1 << 3)
+
+static inline ffa_vm_id_t ffa_notifications_get_receiver(struct ffa_value args)
+{
+ return (args.arg1 >> 16) & 0xffffU;
+}
+
+static inline ffa_vm_id_t ffa_notifications_get_vcpu(struct ffa_value args)
+{
+ return args.arg1 & 0xffffU;
+}
+
+/**
* A set of contiguous pages which is part of a memory region. This corresponds
* to table 40 of the FF-A 1.0 EAC specification, "Constituent memory region
* descriptor".