feat(manifest): support FF-A v1.2 direct messages
Add additional messaging method parsing to indicate whether a partition
can send/receive messages via FFA_MSG_SEND_DIRECT_REQ2.
Also enforce that a manifest declaring an FF-A version < FF-A v1.2
cannot declare usage of FFA_MSG_SEND_DIRECT_REQ2.
Signed-off-by: Kathleen Capella <kathleen.capella@arm.com>
Change-Id: I56f8e15dd00f16932ab7059dc585e12a9ca28f09
diff --git a/inc/hf/ffa_partition_manifest.h b/inc/hf/ffa_partition_manifest.h
index 3345e9e..de68d30 100644
--- a/inc/hf/ffa_partition_manifest.h
+++ b/inc/hf/ffa_partition_manifest.h
@@ -158,7 +158,7 @@
struct rx_tx rxtx;
/** mandatory - direct/indirect msg or both */
- uint8_t messaging_method;
+ uint16_t messaging_method;
/** mandatory - action in response to non secure interrupt */
uint8_t ns_interrupts_action;
/** optional - managed exit signaled through vIRQ */
diff --git a/inc/hf/vm.h b/inc/hf/vm.h
index 9b7f40e..3d28bf4 100644
--- a/inc/hf/vm.h
+++ b/inc/hf/vm.h
@@ -247,7 +247,7 @@
ipaddr_t blob_addr;
} boot_info;
- uint8_t messaging_method;
+ uint16_t messaging_method;
/**
* Action specified by a Partition through the manifest in response to
@@ -369,7 +369,7 @@
uint32_t *ids_count, uint32_t *lists_sizes,
uint32_t *lists_count,
const uint32_t ids_max_count);
-bool vm_supports_messaging_method(struct vm *vm, uint8_t messaging_method);
+bool vm_supports_messaging_method(struct vm *vm, uint16_t messaging_method);
void vm_notifications_set_npi_injected(struct vm_locked vm_locked,
bool npi_injected);
bool vm_notifications_is_npi_injected(struct vm_locked vm_locked);
diff --git a/inc/vmapi/hf/ffa.h b/inc/vmapi/hf/ffa.h
index 9e88ce3..1f22baa 100644
--- a/inc/vmapi/hf/ffa.h
+++ b/inc/vmapi/hf/ffa.h
@@ -722,15 +722,21 @@
* Flags to determine the partition properties, as required by
* FFA_PARTITION_INFO_GET.
*
- * The values of the flags are specified in table 8.25 of DEN0077A FF-A 1.0 REL
+ * The values of the flags are specified in table 6.2 of DEN0077A FF-A 1.2 ALP0
* specification, "Partition information descriptor, partition properties".
*/
typedef uint32_t ffa_partition_properties_t;
-/** Partition property: partition supports receipt of direct requests. */
+/**
+ * Partition property: partition supports receipt of direct requests via the
+ * FFA_MSG_SEND_DIRECT_REQ ABI.
+ */
#define FFA_PARTITION_DIRECT_REQ_RECV (UINT32_C(1) << 0)
-/** Partition property: partition can send direct requests. */
+/**
+ * Partition property: partition can send direct requests via the
+ * FFA_MSG_SEND_DIRECT_REQ ABI.
+ */
#define FFA_PARTITION_DIRECT_REQ_SEND (UINT32_C(1) << 1)
/** Partition property: partition can send and receive indirect messages. */
@@ -743,6 +749,18 @@
#define FFA_PARTITION_AARCH64_EXEC (UINT32_C(1) << 8)
/**
+ * Partition property: partition supports receipt of direct requests via the
+ * FFA_MSG_SEND_DIRECT_REQ2 ABI.
+ */
+#define FFA_PARTITION_DIRECT_REQ2_RECV (UINT32_C(1) << 9)
+
+/**
+ * Partition property: partition can send direct requests via the
+ * FFA_MSG_SEND_DIRECT_REQ2 ABI.
+ */
+#define FFA_PARTITION_DIRECT_REQ2_SEND (UINT32_C(1) << 10)
+
+/**
* Holds information returned for each partition by the FFA_PARTITION_INFO_GET
* interface.
* This corresponds to table 13.37 "Partition information descriptor"