refactor(hypervisor): enabling TEE interaction
At initialization hafnium initializes the other world's resources.
The hypervisor needs to enable its interaction with the TEE, deployed
in the SWd. This was done by passing a boolean to the function
'plat_ffa_init', which sets a local 'ffa_tee_enabled'.
Before forwarding a call to the SPMC, the hypervisor normally checks if
this boolean was set at initialization.
When loading the VMs the hypervisor might need to call the SPMC
with FFA_NOTIFICATION_BITMAP_CREATE, in case notifications are enabled.
The VMs were being loaded before the call to 'plat_ffa_init', so
setting 'ffa_tee_enabled' was factored out into its own function, which
is invoked before loading VMs.
Change-Id: Ifaaf11ee62cdbd5d09f75fabb57068de7d38d01d
Signed-off-by: J-Alves <joao.alves@arm.com>
diff --git a/inc/hf/arch/plat/ffa.h b/inc/hf/arch/plat/ffa.h
index d085f0a..f4c9dab 100644
--- a/inc/hf/arch/plat/ffa.h
+++ b/inc/hf/arch/plat/ffa.h
@@ -57,7 +57,8 @@
struct ffa_value plat_ffa_spmc_id_get(void);
void plat_ffa_log_init(void);
-void plat_ffa_init(bool tee_enabled);
+void plat_ffa_set_tee_enabled(bool tee_enabled);
+void plat_ffa_init(void);
bool plat_ffa_is_memory_send_valid(ffa_vm_id_t receiver_vm_id,
uint32_t share_func);