fix(ff-a): dispatch other world functions
Move FF-A related functions from other world module to plat ffa module
with different implementations based upon building the Hypervisor, SPMC,
or standalone image.
Change-Id: I85bedf58ddc074d41bb25ae2dcbcdaa407821562
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
diff --git a/src/api.c b/src/api.c
index 01c91b5..5d9e32f 100644
--- a/src/api.c
+++ b/src/api.c
@@ -10,9 +10,9 @@
#include "hf/arch/cpu.h"
#include "hf/arch/ffa.h"
-#include "hf/arch/ffa_memory_handle.h"
#include "hf/arch/mm.h"
#include "hf/arch/other_world.h"
+#include "hf/arch/plat/ffa.h"
#include "hf/arch/timer.h"
#include "hf/arch/vm.h"
@@ -1788,13 +1788,12 @@
return ffa_error(FFA_INVALID_PARAMETERS);
}
- if (!arch_other_world_is_direct_request_valid(current, sender_vm_id,
- receiver_vm_id)) {
+ if (!plat_ffa_is_direct_request_valid(current, sender_vm_id,
+ receiver_vm_id)) {
return ffa_error(FFA_INVALID_PARAMETERS);
}
- if (arch_other_world_direct_request_forward(receiver_vm_id, args,
- &ret)) {
+ if (plat_ffa_direct_request_forward(receiver_vm_id, args, &ret)) {
return ret;
}
@@ -1912,8 +1911,8 @@
struct ffa_value to_ret = api_ffa_dir_msg_value(args);
- if (!arch_other_world_is_direct_response_valid(current, sender_vm_id,
- receiver_vm_id)) {
+ if (!plat_ffa_is_direct_response_valid(current, sender_vm_id,
+ receiver_vm_id)) {
return ffa_error(FFA_INVALID_PARAMETERS);
}
@@ -2247,7 +2246,7 @@
struct vm *to = current->vm;
struct ffa_value ret;
- if (ffa_memory_handle_allocated_by_current_world(handle)) {
+ if (plat_ffa_memory_handle_allocated_by_current_world(handle)) {
struct vm_locked to_locked = vm_lock(to);
ret = ffa_memory_reclaim(to_locked, handle, flags,