refactor(memory share): replace instances of TEE
Replace instances of TEE/tee in the file "ffa_memory.c" and "api.c"
by "other world", where related to memory sharing functionality:
- In the Hypervisor these are symbols referring to the SPMC/TEE.
- In the SPMC these are symbols referring to the Hypervisor or OS
kernel.
Change-Id: I93d7dc910c687ca6d68228fde4c138a3cf6006a9
Signed-off-by: J-Alves <joao.alves@arm.com>
diff --git a/src/api.c b/src/api.c
index 705db71..aa0ae8f 100644
--- a/src/api.c
+++ b/src/api.c
@@ -2914,14 +2914,14 @@
}
}
- /* Allow for one memory region to be shared to the TEE. */
+ /* Allow for one memory region to be shared to the other world. */
if (targets_other_world) {
assert(memory_region->receiver_count == 1);
to = vm_find(HF_OTHER_WORLD_ID);
/*
* The 'to' VM lock is only needed in the case that it is the
- * TEE VM.
+ * other world VM.
*/
struct two_vm_locked vm_to_from_lock = vm_lock_both(to, from);
@@ -2930,12 +2930,12 @@
goto out_unlock;
}
- ret = ffa_memory_tee_send(
+ ret = ffa_memory_other_world_send(
vm_to_from_lock.vm2, vm_to_from_lock.vm1, memory_region,
length, fragment_length, share_func, &api_page_pool);
/*
- * ffa_tee_memory_send takes ownership of the memory_region, so
- * make sure we don't free it.
+ * ffa_other_world_memory_send takes ownership of the
+ * memory_region, so make sure we don't free it.
*/
memory_region = NULL;
@@ -3107,9 +3107,9 @@
struct vm *from = vm_find(HF_TEE_VM_ID);
struct two_vm_locked vm_to_from_lock = vm_lock_both(to, from);
- ret = ffa_memory_tee_reclaim(vm_to_from_lock.vm1,
- vm_to_from_lock.vm2, handle, flags,
- &api_page_pool);
+ ret = ffa_memory_other_world_reclaim(
+ vm_to_from_lock.vm1, vm_to_from_lock.vm2, handle, flags,
+ &api_page_pool);
vm_unlock(&vm_to_from_lock.vm1);
vm_unlock(&vm_to_from_lock.vm2);
@@ -3233,16 +3233,16 @@
/*
* The TEE RX buffer state is checked in
- * `ffa_memory_tee_send_continue` rather than here, as we need
- * to return `FFA_MEM_FRAG_RX` with the current offset rather
- * than FFA_ERROR FFA_BUSY in case it is busy.
+ * `ffa_memory_other_world_send_continue` rather than here, as
+ * we need to return `FFA_MEM_FRAG_RX` with the current offset
+ * rather than FFA_ERROR FFA_BUSY in case it is busy.
*/
- ret = ffa_memory_tee_send_continue(
+ ret = ffa_memory_other_world_send_continue(
vm_to_from_lock.vm2, vm_to_from_lock.vm1, fragment_copy,
fragment_length, handle, &api_page_pool);
/*
- * `ffa_memory_tee_send_continue` takes ownership of the
+ * `ffa_memory_other_world_send_continue` takes ownership of the
* fragment_copy, so we don't need to free it here.
*/