/SPARTAN/trunk/src/main/main.c |
---|
94,7 → 94,7 |
config.kernel_size = hardcoded_ktext_size + hardcoded_kdata_size + CONFIG_HEAP_SIZE + CONFIG_STACK_SIZE; |
context_save(&ctx); |
ctx.sp = config.base + config.kernel_size - 8; |
ctx.sp = config.base + config.kernel_size - SP_DELTA; |
ctx.pc = FADDR(main_bsp_separated_stack); |
context_restore(&ctx); |
/* not reached */ |
192,7 → 192,7 |
* collide with another CPU coming up. To prevent this, we |
* switch to this cpu's private stack prior to waking kmp up. |
*/ |
CPU->saved_context.sp = (__address) &CPU->stack[CPU_STACK_SIZE-8]; |
CPU->saved_context.sp = (__address) &CPU->stack[CPU_STACK_SIZE-SP_DELTA]; |
CPU->saved_context.pc = FADDR(main_ap_separated_stack); |
context_restore(&CPU->saved_context); |
/* not reached */ |
/SPARTAN/trunk/src/proc/scheduler.c |
---|
232,7 → 232,7 |
* scheduler_separated_stack(). |
*/ |
context_save(&CPU->saved_context); |
CPU->saved_context.sp = (__address) &CPU->stack[CPU_STACK_SIZE-8]; |
CPU->saved_context.sp = (__address) &CPU->stack[CPU_STACK_SIZE-SP_DELTA]; |
CPU->saved_context.pc = FADDR(scheduler_separated_stack); |
context_restore(&CPU->saved_context); |
/* not reached */ |
/SPARTAN/trunk/src/proc/thread.c |
---|
166,7 → 166,7 |
context_save(&t->saved_context); |
t->saved_context.pc = FADDR(cushion); |
t->saved_context.sp = (__address) &t->kstack[THREAD_STACK_SIZE-8]; |
t->saved_context.sp = (__address) &t->kstack[THREAD_STACK_SIZE-SP_DELTA]; |
pri = cpu_priority_high(); |
t->saved_context.pri = cpu_priority_read(); |