feat(ff-a): introduce count flag to ffa_partition_info_get
The partition count flag controls whether to return partition
info descriptors on a call to FFA_PARTITION_INFO_GET. This
patch introduces this functionality.
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
Change-Id: Ib4a13c10e107daf726e5d6ec0ce6bd0d451c1b0f
diff --git a/inc/hf/api.h b/inc/hf/api.h
index 640c980..13fe923 100644
--- a/inc/hf/api.h
+++ b/inc/hf/api.h
@@ -59,7 +59,8 @@
struct ffa_value api_ffa_version(struct vcpu *current,
uint32_t requested_version);
struct ffa_value api_ffa_partition_info_get(struct vcpu *current,
- const struct ffa_uuid *uuid);
+ const struct ffa_uuid *uuid,
+ const uint32_t flags);
struct ffa_value api_ffa_id_get(const struct vcpu *current);
struct ffa_value api_ffa_spm_id_get(void);
struct ffa_value api_ffa_feature_success(uint32_t arg2);
diff --git a/inc/hf/arch/plat/ffa.h b/inc/hf/arch/plat/ffa.h
index b26524f..3a78182 100644
--- a/inc/hf/arch/plat/ffa.h
+++ b/inc/hf/arch/plat/ffa.h
@@ -222,5 +222,6 @@
struct vcpu *next, struct vcpu *current);
void plat_ffa_partition_info_get_forward(const struct ffa_uuid *uuid,
+ const uint32_t flags,
struct ffa_partition_info *partitions,
ffa_vm_count_t *ret_count);
diff --git a/inc/vmapi/hf/ffa.h b/inc/vmapi/hf/ffa.h
index 0440ef8..7668b96 100644
--- a/inc/vmapi/hf/ffa.h
+++ b/inc/vmapi/hf/ffa.h
@@ -126,6 +126,14 @@
#define FFA_MEM_PERM_RW UINT32_C(0x5)
#define FFA_MEM_PERM_RX UINT32_C(0x3)
+/*
+ * Defined in Table 13.31 in the FF-A v1.1 BETA0 specification.
+ * The Partition count flag is used by FFA_PARTITION_INFO_GET to specify
+ * if partition info descriptors should be returned or just the count.
+ */
+#define FFA_PARTITION_COUNT_FLAG 0x1
+#define FFA_PARTITION_COUNT_FLAG_MASK 0x1
+
/**
* For use where the FF-A specification refers explicitly to '4K pages'. Not to
* be confused with PAGE_SIZE, which is the translation granule Hafnium is