[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT early RFC PATCH 11/11] plat/kvm/arm: Enable scheduler on secondary APs



Signed-off-by: Jia He <justin.he@xxxxxxx>
---
 plat/kvm/arm/setup.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/plat/kvm/arm/setup.c b/plat/kvm/arm/setup.c
index b262d94..ac67988 100644
--- a/plat/kvm/arm/setup.c
+++ b/plat/kvm/arm/setup.c
@@ -350,6 +350,23 @@ void init_secondary(uint64_t cpu)
 
        if (smp_cpus == mp_ncpus)
                smp_started = 1;
+
+       a = ukplat_memallocator_get();
+       if (a == NULL)
+               UK_CRASH("memallocator is not initialized\n");
+
+       s = uk_sched_default_init(a);
+       if (unlikely(!s))
+               UK_CRASH("Could not initialize the scheduler in APs\n");
+
+       /* Enable interrupts before starting the application */
+       ukplat_lcpu_enable_irq();
+
+       /* Enter the scheduler */
+       uk_sched_start(s);
+
+       UK_CRASH("scheduler returned us to init secondary");
+       /* NOTREACHED */
 }
 
 void start_cpu(uint64_t target_cpu)
-- 
2.17.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.