refactor: dynamically allocate per vcpu notifications
This patch makes changes required to allocate the per vcpu notification
structures dynamically based on vcpu count and remove dependency on the
MAX_CPUS macros. This should further help reduce memory foot print of
hafnium.
Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@gmail.com>
Change-Id: I1f6df87e328e80ebfb9c8a0ac8cb07cef03c9714
diff --git a/src/init.c b/src/init.c
index b391d50..83de0b4 100644
--- a/src/init.c
+++ b/src/init.c
@@ -177,14 +177,14 @@
mm_unlock_stage1(&mm_stage1_locked);
- /* Initialise the API page pool. ppool will be empty from now on. */
- api_init(&ppool);
-
/* Enable TLB invalidation for VM page table updates. */
mm_vm_enable_invalidation();
/* Perform platform specfic FF-A initialization. */
- plat_ffa_init();
+ plat_ffa_init(&ppool);
+
+ /* Initialise the API page pool. ppool will be empty from now on. */
+ api_init(&ppool);
dlog_info("Hafnium initialisation completed\n");
}