[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH 17/17] lib/ukboot: Updates for inlining with platform and scheduling changes
Changes: * init the IRQ subsystem * init the timer after memory allocator initialization * enable the interrupts just before starting the application when scheduling is not enabled * using uk_sched_default_init for scheduler init * using uk_sched_start which also starts the idle thread and enables the interrupts Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx> --- lib/ukboot/boot.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/ukboot/boot.c b/lib/ukboot/boot.c index acbae6e..c178ebf 100644 --- a/lib/ukboot/boot.c +++ b/lib/ukboot/boot.c @@ -43,12 +43,14 @@ #if LIBUKALLOC && LIBUKALLOCBBUDDY && LIBUKBOOT_INITALLOC #include <uk/allocbbuddy.h> #endif -#if LIBUKSCHED && LIBUKSCHEDCOOP -#include <uk/schedcoop.h> +#if LIBUKSCHED +#include <uk/sched.h> #endif #include <uk/arch/lcpu.h> #include <uk/plat/bootstrap.h> #include <uk/plat/memory.h> +#include <uk/plat/lcpu.h> +#include <uk/plat/irq.h> #include <uk/plat/time.h> #include <uk/essentials.h> #include <uk/print.h> @@ -127,7 +129,6 @@ void ukplat_entry(int argc, char *argv[]) STRINGIFY(UK_CODENAME) " " STRINGIFY(UK_FULLVERSION)); #endif - ukplat_time_init(); #if LIBUKALLOC && LIBUKALLOCBBUDDY && LIBUKBOOT_INITALLOC /* initialize memory allocator @@ -180,11 +181,15 @@ void ukplat_entry(int argc, char *argv[]) } if (unlikely(!a)) uk_printd(DLVL_WARN, "No suitable memory region for memory allocator. Continue without heap\n"); + + ukplat_irq_init(a); #endif + ukplat_time_init(); + #if HAVE_SCHED /* Init scheduler. */ - s = uk_schedcoop_init(a); + s = uk_sched_default_init(a); if (unlikely(!s)) UK_CRASH("Could not initialize the scheduler."); #endif @@ -196,9 +201,10 @@ void ukplat_entry(int argc, char *argv[]) main_thread = uk_thread_create("main", main_thread_func, &tma); if (unlikely(!main_thread)) UK_CRASH("Could not create main thread."); - uk_thread_start(main_thread); - uk_sched_run(s); + uk_sched_start(s); #else + /* Enable interrupts before starting the application */ + ukplat_lcpu_enable_irq(); main_thread_func(&tma); #endif } -- 2.1.4 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |