[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


  • To: minios-devel@xxxxxxxxxxxxx
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Tue, 27 Mar 2018 15:29:50 +0300
  • Cc: simon.kuenzer@xxxxxxxxx
  • Delivery-date: Tue, 27 Mar 2018 12:30:14 +0000
  • Ironport-phdr: 9a23:NK/ESRMs4N1YiCwtwq8l6mtUPXoX/o7sNwtQ0KIMzox0Ivz9rarrMEGX3/hxlliBBdydt6ofzbKO+4nbGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2aFLduGC94iAPERvjKwV1Ov71GonPhMiryuy+4ZLebxlGiTanfb9+MAi9oBnMuMURnYZsMLs6xAHTontPdeRWxGdoKkyWkh3h+Mq+/4Nt/jpJtf45+MFOTav1f6IjTbxFFzsmKHw65NfqtRbYUwSC4GYXX3gMnRpJBwjF6wz6Xov0vyDnuOdxxDWWMMvrRr0yRD+s7bpkSAXwhSkHKTA37W/ZhM93gq1ZrhKsvABzz5LObY2JLvdyYr/RcNUHTmRBRMZRUClBD5uiYosIFOoBIedYr4/grFUIsBu+HRSsD/7oxzBUgX/2xrE60+UnEQ3c2AwgAsoOsGnPodrpL6ceS/i1zLTTwjnZdfNW3i7w5Y7VeR4iufGBRa98fMXMxUU1FA7Ijk+cpZL7Mz6XzOgAvXCX4/dvWO6ykWIqqAF8riKxysoihITFnJ8Zx1/a+Sh/3Y07P8e3SFRhbt6hCJZQsiaaOJZoTc46WGFovTo6yqUBuZ6mYCgG0JQnyADba/yAa4WI/BfjW/yQITd8nn5qZKm/iwyq8Ui90eLwTNO00FFSoipElNnDqGwN2gTO5sWIV/dx5ESs1DaV2wzN9O1JI1o4mKTDJ54k2LEwl54TsUrZHi/xnUX7lLOZdkI/+ui06uTnZK/qppuBN49slwHzKbghmtelDeQgLwgBRHKX+f671LH75032XK1KjuEqkqneqJ3aIMUbpqi4Aw9SyYYv8guwACm40NsGmXkKN1ZFeBOcj4j1IFHCOv/5Aum5g1i2lzdr3f/GNKX7AprRNnjDjKvhfbFl5k5HyQozyNdf55ROBrECPfL8REnxtd3GAR8jKAG0xfjoB8l51owEQm2DGLGWML6B+WOPs+cuJeiLf8oZtSjwL9Ah5uXyljkplFlberOmjrUNb3XtNfN9P0SfKV7xmspJRWwNpRY/SqrulUWfeTVIIW6vVeQm4WdoW8qdEY7fS9X10/S61yChE8gOaw==
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

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

 


Rackspace

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