Changes in kernel/generic/src/main/main.c [26aafe8:1caeb2d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/main/main.c
r26aafe8 r1caeb2d 58 58 #include <proc/thread.h> 59 59 #include <proc/task.h> 60 #include <proc/tasklet.h> 60 61 #include <main/kinit.h> 61 62 #include <main/version.h> … … 71 72 #include <mm/as.h> 72 73 #include <mm/slab.h> 73 #include <mm/reserve.h>74 74 #include <synch/waitq.h> 75 75 #include <synch/futex.h> … … 118 118 #endif 119 119 120 #define CONFIG_STACK_SIZE ((1 << STACK_FRAMES) * STACK_SIZE) 121 120 122 /** Main kernel routine for bootstrap CPU. 121 123 * … … 137 139 config.kernel_size = ALIGN_UP(hardcoded_ktext_size + 138 140 hardcoded_kdata_size, PAGE_SIZE); 139 config.stack_size = STACK_SIZE;141 config.stack_size = CONFIG_STACK_SIZE; 140 142 141 143 /* Initialy the stack is placed just after the kernel */ … … 163 165 164 166 context_save(&ctx); 165 context_set(&ctx, FADDR(main_bsp_separated_stack), 166 config.stack_base,STACK_SIZE);167 context_set(&ctx, FADDR(main_bsp_separated_stack), config.stack_base, 168 THREAD_STACK_SIZE); 167 169 context_restore(&ctx); 168 170 /* not reached */ … … 215 217 tlb_init(); 216 218 ddi_init(); 219 tasklet_init(); 217 220 arch_post_mm_init(); 218 reserve_init();219 221 arch_pre_smp_init(); 220 222 smp_init(); … … 223 225 slab_enable_cpucache(); 224 226 225 uint64_t size; 226 const char *size_suffix; 227 bin_order_suffix(zones_total_size(), &size, &size_suffix, false); 228 printf("Detected %u CPU(s), %" PRIu64 " %s free memory\n", 229 config.cpu_count, size, size_suffix); 227 printf("Detected %u CPU(s), %" PRIu64 " MiB free memory\n", 228 config.cpu_count, SIZE2MB(zones_total_size())); 230 229 231 230 cpu_init(); … … 321 320 context_save(&CPU->saved_context); 322 321 context_set(&CPU->saved_context, FADDR(main_ap_separated_stack), 323 (uintptr_t) CPU->stack, STACK_SIZE);322 (uintptr_t) CPU->stack, CPU_STACK_SIZE); 324 323 context_restore(&CPU->saved_context); 325 324 /* not reached */
Note:
See TracChangeset
for help on using the changeset viewer.