]> xenbits.xensource.com Git - people/liuw/rumprun.git/commitdiff
pass stack size to bmk-core as page shift instead of size
authorAntti Kantee <pooka@iki.fi>
Mon, 20 Apr 2015 12:28:06 +0000 (12:28 +0000)
committerAntti Kantee <pooka@iki.fi>
Mon, 20 Apr 2015 12:28:06 +0000 (12:28 +0000)
include/bmk-core/core.h
lib/librumprun_core/init.c
platform/baremetal/kernel.c
platform/xen/xen/kernel.c

index 896f37d76ef787f41aa32967b2251edc3fea9b2d..0b1e885dd50204f009825ea48316752363584ce6 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <bmk-core/platform.h>
 
-int bmk_core_init(long, long);
+int bmk_core_init(unsigned long, unsigned long);
 
 #define bmk_assert(x)                                                  \
   do {                                                                 \
@@ -37,6 +37,6 @@ int bmk_core_init(long, long);
        }                                                               \
   } while (0)
 
-extern long bmk_stacksize, bmk_pagesize;
+extern unsigned long bmk_stackpageorder, bmk_stacksize, bmk_pagesize;
 
 #endif /* _BMK_CORE_CORE_H_ */
index e14112357270093c6695c6b4cf993409bc1de0fa..215b59e5281e4b5f1fed8cc582b4c8b7db472ad6 100644 (file)
 
 #include <bmk-core/core.h>
 
-long bmk_stacksize;
-long bmk_pagesize;
+unsigned long bmk_stackpageorder;
+unsigned long bmk_stacksize;
+unsigned long bmk_pagesize;
 
 int
-bmk_core_init(long stacksize, long pagesize)
+bmk_core_init(unsigned long stackpageorder, unsigned long pagesize)
 {
 
-       bmk_stacksize = stacksize;
+       bmk_stackpageorder = stackpageorder;
+       bmk_stacksize = (1<<stackpageorder) * pagesize;
        bmk_pagesize = pagesize;
 
        return 0;
index c8adebd378057201270e299f03ded7a821405a3e..f73b1d031043aba844db67a8677e0992fbb2ba3a 100644 (file)
@@ -152,7 +152,7 @@ bmk_main(struct multiboot_info *mbi)
 {
 
        bmk_printf_init(bmk_cons_putc, NULL);
-       bmk_core_init(BMK_THREAD_STACKSIZE, PAGE_SIZE);
+       bmk_core_init(BMK_THREAD_STACK_PAGE_ORDER, PAGE_SIZE);
 
        bmk_printf("rump kernel bare metal bootstrap\n\n");
        if ((mbi->flags & MULTIBOOT_MEMORY_INFO) == 0) {
index 969be3dbe5fb5f61461eafe353f6e00452e606dd..bbdd29039d616156104ed28694ecb1537a306a26 100644 (file)
@@ -122,7 +122,7 @@ bmk_platform_splx(unsigned long x)
 void _minios_start_kernel(start_info_t *si)
 {
 
-    bmk_core_init(STACK_SIZE, PAGE_SIZE);
+    bmk_core_init(STACK_SIZE_PAGE_ORDER, PAGE_SIZE);
 
     arch_init(si);
     trap_init();