Rev 78 | Rev 97 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 78 | Rev 81 | ||
---|---|---|---|
Line 92... | Line 92... | ||
92 | config.base = hardcoded_load_address; |
92 | config.base = hardcoded_load_address; |
93 | config.memory_size = CONFIG_MEMORY_SIZE; |
93 | config.memory_size = CONFIG_MEMORY_SIZE; |
94 | config.kernel_size = hardcoded_ktext_size + hardcoded_kdata_size + CONFIG_HEAP_SIZE + CONFIG_STACK_SIZE; |
94 | config.kernel_size = hardcoded_ktext_size + hardcoded_kdata_size + CONFIG_HEAP_SIZE + CONFIG_STACK_SIZE; |
95 | 95 | ||
96 | context_save(&ctx); |
96 | context_save(&ctx); |
97 | ctx.sp = config.base + config.kernel_size - 8; |
97 | ctx.sp = config.base + config.kernel_size - SP_DELTA; |
98 | ctx.pc = FADDR(main_bsp_separated_stack); |
98 | ctx.pc = FADDR(main_bsp_separated_stack); |
99 | context_restore(&ctx); |
99 | context_restore(&ctx); |
100 | /* not reached */ |
100 | /* not reached */ |
101 | } |
101 | } |
102 | 102 | ||
Line 190... | Line 190... | ||
190 | /* |
190 | /* |
191 | * If we woke kmp up before we left the kernel stack, we could |
191 | * If we woke kmp up before we left the kernel stack, we could |
192 | * collide with another CPU coming up. To prevent this, we |
192 | * collide with another CPU coming up. To prevent this, we |
193 | * switch to this cpu's private stack prior to waking kmp up. |
193 | * switch to this cpu's private stack prior to waking kmp up. |
194 | */ |
194 | */ |
195 | CPU->saved_context.sp = (__address) &CPU->stack[CPU_STACK_SIZE-8]; |
195 | CPU->saved_context.sp = (__address) &CPU->stack[CPU_STACK_SIZE-SP_DELTA]; |
196 | CPU->saved_context.pc = FADDR(main_ap_separated_stack); |
196 | CPU->saved_context.pc = FADDR(main_ap_separated_stack); |
197 | context_restore(&CPU->saved_context); |
197 | context_restore(&CPU->saved_context); |
198 | /* not reached */ |
198 | /* not reached */ |
199 | } |
199 | } |
200 | 200 |