feat(notifications): schedule receiver interrupt
Configuring Schedule Receiver Interrupt for each CPU, and send
respective SGI to the NWd. If flag FFA_NOTIFICATIONS_FLAG_DELAY_SRI
is set, the SGI will be sent upon context switch from the SWd to the NWd
else it will be sent immediately, the sender SP execution will be
preempted.
A state machine was implemented to coordinate handling and sending of
the SRI.
Change-Id: If05a6535094f5da7189d8dbb55b04e7c1a1f80d7
Signed-off-by: J-Alves <joao.alves@arm.com>
diff --git a/src/main.c b/src/main.c
index 408a2d1..239ca7a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -6,9 +6,14 @@
* https://opensource.org/licenses/BSD-3-Clause.
*/
+#include "hf/arch/plat/ffa.h"
+
#include "hf/cpu.h"
+#include "hf/dlog.h"
#include "hf/vm.h"
+#include "vmapi/hf/ffa.h"
+
/**
* The entry point of CPUs when they are turned on. It is supposed to initialise
* all state and return the first vCPU to run.
@@ -31,5 +36,8 @@
/* Reset the registers to give a clean start for vCPU. */
vcpu_reset(vcpu);
+ /* Initialize SRI for running core. */
+ plat_ffa_sri_init(c);
+
return vcpu;
}