diff options
Diffstat (limited to 'include/runtime_services/spm_common.h')
-rw-r--r-- | include/runtime_services/spm_common.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/runtime_services/spm_common.h b/include/runtime_services/spm_common.h index b09000238..74a2b2746 100644 --- a/include/runtime_services/spm_common.h +++ b/include/runtime_services/spm_common.h @@ -82,4 +82,30 @@ bool check_spmc_execution_level(void); unsigned int get_ffa_feature_test_target(const struct ffa_features_test **test_target); +/** + * Helper to conduct a memory retrieve. This is to be called by the receiver + * of a memory share operation. + */ +bool memory_retrieve(struct mailbox_buffers *mb, + struct ffa_memory_region **retrieved, uint64_t handle, + ffa_vm_id_t sender, ffa_vm_id_t receiver, + uint32_t mem_func); + +/** + * Helper to conduct a memory relinquish. The caller is usually the receiver, + * after it being done with the memory shared, identified by the 'handle'. + */ +bool memory_relinquish(struct ffa_mem_relinquish *m, uint64_t handle, + ffa_vm_id_t id); + +ffa_memory_handle_t memory_send( + struct ffa_memory_region *memory_region, uint32_t mem_func, + uint32_t fragment_length, uint32_t total_length); + +ffa_memory_handle_t memory_init_and_send( + struct ffa_memory_region *memory_region, size_t memory_region_max_size, + ffa_vm_id_t sender, ffa_vm_id_t receiver, + const struct ffa_memory_region_constituent* constituents, + uint32_t constituents_count, uint32_t mem_func); + #endif /* SPM_COMMON_H */ |