refactor: hypervisor retrieve request helpers
Factored out of hypervisor_retrieve_request the looping
part, for retrieving the fragments of a fragmented
retrieve request. This is to aid testing hypervisor retrieve
request, when it faults in the middle of the operation.
Also added two helpers to access the size of a fragment
and the total size for both ABIs:
- FFA_MEM_RETRIEVE_RESP.
- FFA_MEM_FRAG_TX.
Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: I49d12d69eff8c132b0a29954772dd6634f590f88
diff --git a/include/runtime_services/spm_common.h b/include/runtime_services/spm_common.h
index 3fe154a..c794cb0 100644
--- a/include/runtime_services/spm_common.h
+++ b/include/runtime_services/spm_common.h
@@ -116,6 +116,10 @@
uint32_t receiver_count, ffa_memory_region_flags_t flags,
bool is_normal_memory);
+bool hypervisor_retrieve_request_continue(
+ struct mailbox_buffers *mb, uint64_t handle, void *out, uint32_t out_size,
+ uint32_t total_size, uint32_t fragment_offset, bool release_rx);
+
bool hypervisor_retrieve_request(struct mailbox_buffers *mb, uint64_t handle,
void *out, uint32_t out_size);