Changes in kernel/generic/src/main/main.c [25939997:d28bdbe] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/main/main.c
r25939997 rd28bdbe 80 80 #include <arch/arch.h> 81 81 #include <arch.h> 82 #include <arch/faddr.h> 82 83 #include <ipc/ipc.h> 83 84 #include <macros.h> … … 173 174 ALIGN_UP((uintptr_t) kdata_end - config.base, PAGE_SIZE); 174 175 175 context_create(&ctx, main_bsp_separated_stack, 176 context_save(&ctx); 177 context_set(&ctx, FADDR(main_bsp_separated_stack), 176 178 bootstrap_stack, bootstrap_stack_size); 177 179 context_restore(&ctx); … … 280 282 if (!kinit_thread) 281 283 panic("Cannot create kinit thread."); 282 thread_start(kinit_thread); 283 thread_detach(kinit_thread); 284 285 /* 286 * This call to scheduler_run() will return to kinit, 284 thread_ready(kinit_thread); 285 286 /* 287 * This call to scheduler() will return to kinit, 287 288 * starting the thread of kernel threads. 288 289 */ 289 current_copy(CURRENT, (current_t *) CPU_LOCAL->stack); 290 context_replace(scheduler_run, CPU_LOCAL->stack, STACK_SIZE); 290 scheduler(); 291 291 /* not reached */ 292 292 } … … 328 328 ARCH_OP(post_cpu_init); 329 329 330 current_copy(CURRENT, (current_t *) CPU->stack); 331 330 332 /* 331 333 * If we woke kmp up before we left the kernel stack, we could … … 333 335 * switch to this cpu's private stack prior to waking kmp up. 334 336 */ 335 current_copy(CURRENT, (current_t *) CPU_LOCAL->stack); 336 context_replace(main_ap_separated_stack, CPU_LOCAL->stack, STACK_SIZE); 337 context_t ctx; 338 context_save(&ctx); 339 context_set(&ctx, FADDR(main_ap_separated_stack), 340 (uintptr_t) CPU->stack, STACK_SIZE); 341 context_restore(&ctx); 337 342 /* not reached */ 338 343 } … … 351 356 352 357 semaphore_up(&ap_completion_semaphore); 353 scheduler _run();358 scheduler(); 354 359 /* not reached */ 355 360 }
Note:
See TracChangeset
for help on using the changeset viewer.