feat(memory share): send multiple receiver regions
Updates `memory_init_and_send` to allow passing more than one receiver.
Tests for this functionality will be added in the next commit.
Change-Id: I51d92d74f64bfebfa3d49ff6d5066050087b44ef
Signed-off-by: Karl Meakin <karl.meakin@arm.com>
diff --git a/include/runtime_services/ffa_helpers.h b/include/runtime_services/ffa_helpers.h
index 90bb30f..f265fe8 100644
--- a/include/runtime_services/ffa_helpers.h
+++ b/include/runtime_services/ffa_helpers.h
@@ -641,9 +641,8 @@
uint32_t ffa_memory_retrieve_request_init(
struct ffa_memory_region *memory_region, ffa_memory_handle_t handle,
- ffa_id_t sender, ffa_id_t receiver, uint32_t tag,
- ffa_memory_region_flags_t flags, enum ffa_data_access data_access,
- enum ffa_instruction_access instruction_access,
+ ffa_id_t sender, struct ffa_memory_access receivers[],
+ uint32_t receiver_count, uint32_t tag, ffa_memory_region_flags_t flags,
enum ffa_memory_type type, enum ffa_memory_cacheability cacheability,
enum ffa_memory_shareability shareability);
@@ -652,12 +651,12 @@
uint32_t ffa_memory_region_init(
struct ffa_memory_region *memory_region, size_t memory_region_max_size,
- ffa_id_t sender, ffa_id_t receiver,
+ ffa_id_t sender, struct ffa_memory_access receivers[],
+ uint32_t receiver_count,
const struct ffa_memory_region_constituent constituents[],
uint32_t constituent_count, uint32_t tag,
- ffa_memory_region_flags_t flags, enum ffa_data_access data_access,
- enum ffa_instruction_access instruction_access,
- enum ffa_memory_type type, enum ffa_memory_cacheability cacheability,
+ ffa_memory_region_flags_t flags, enum ffa_memory_type type,
+ enum ffa_memory_cacheability cacheability,
enum ffa_memory_shareability shareability, uint32_t *total_length,
uint32_t *fragment_length);
diff --git a/include/runtime_services/spm_common.h b/include/runtime_services/spm_common.h
index e9c845d..6494947 100644
--- a/include/runtime_services/spm_common.h
+++ b/include/runtime_services/spm_common.h
@@ -109,8 +109,9 @@
*/
bool memory_retrieve(struct mailbox_buffers *mb,
struct ffa_memory_region **retrieved, uint64_t handle,
- ffa_id_t sender, ffa_id_t receiver,
- ffa_memory_region_flags_t flags, uint32_t mem_func);
+ ffa_id_t sender, struct ffa_memory_access receivers[],
+ uint32_t receiver_count, ffa_memory_region_flags_t flags,
+ uint32_t mem_func);
bool hypervisor_retrieve_request(struct mailbox_buffers *mb, uint64_t handle,
void *out, uint32_t out_size);
@@ -128,8 +129,9 @@
ffa_memory_handle_t memory_init_and_send(
struct ffa_memory_region *memory_region, size_t memory_region_max_size,
- ffa_id_t sender, ffa_id_t receiver,
- const struct ffa_memory_region_constituent* constituents,
+ ffa_id_t sender, struct ffa_memory_access receivers[],
+ uint32_t receiver_count,
+ const struct ffa_memory_region_constituent *constituents,
uint32_t constituents_count, uint32_t mem_func, struct ffa_value *ret);
bool ffa_partition_info_helper(struct mailbox_buffers *mb,