Changes in kernel/generic/src/main/main.c [97186929:26aafe8] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/main/main.c
r97186929 r26aafe8 71 71 #include <mm/as.h> 72 72 #include <mm/slab.h> 73 #include <mm/reserve.h> 73 74 #include <synch/waitq.h> 74 75 #include <synch/futex.h> … … 117 118 #endif 118 119 119 #define CONFIG_STACK_SIZE ((1 << STACK_FRAMES) * STACK_SIZE)120 121 120 /** Main kernel routine for bootstrap CPU. 122 121 * … … 138 137 config.kernel_size = ALIGN_UP(hardcoded_ktext_size + 139 138 hardcoded_kdata_size, PAGE_SIZE); 140 config.stack_size = CONFIG_STACK_SIZE;139 config.stack_size = STACK_SIZE; 141 140 142 141 /* Initialy the stack is placed just after the kernel */ … … 164 163 165 164 context_save(&ctx); 166 context_set(&ctx, FADDR(main_bsp_separated_stack), config.stack_base,167 THREAD_STACK_SIZE);165 context_set(&ctx, FADDR(main_bsp_separated_stack), 166 config.stack_base, STACK_SIZE); 168 167 context_restore(&ctx); 169 168 /* not reached */ … … 217 216 ddi_init(); 218 217 arch_post_mm_init(); 218 reserve_init(); 219 219 arch_pre_smp_init(); 220 220 smp_init(); … … 223 223 slab_enable_cpucache(); 224 224 225 printf("Detected %u CPU(s), %" PRIu64 " MiB free memory\n", 226 config.cpu_count, SIZE2MB(zones_total_size())); 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 230 228 231 cpu_init(); … … 318 321 context_save(&CPU->saved_context); 319 322 context_set(&CPU->saved_context, FADDR(main_ap_separated_stack), 320 (uintptr_t) CPU->stack, CPU_STACK_SIZE);323 (uintptr_t) CPU->stack, STACK_SIZE); 321 324 context_restore(&CPU->saved_context); 322 325 /* not reached */
Note:
See TracChangeset
for help on using the changeset viewer.