Rev 37 | Rev 47 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 37 | Rev 46 | ||
---|---|---|---|
Line 89... | Line 89... | ||
89 | 89 | ||
90 | config.base = hardcoded_load_address; |
90 | config.base = hardcoded_load_address; |
91 | config.memory_size = CONFIG_MEMORY_SIZE; |
91 | config.memory_size = CONFIG_MEMORY_SIZE; |
92 | config.kernel_size = hardcoded_ktext_size + hardcoded_kdata_size + CONFIG_HEAP_SIZE + CONFIG_STACK_SIZE; |
92 | config.kernel_size = hardcoded_ktext_size + hardcoded_kdata_size + CONFIG_HEAP_SIZE + CONFIG_STACK_SIZE; |
93 | 93 | ||
94 | context_save(&ctx); |
94 | context_save(&ctx); /* There is no nead to save FPU context */ |
95 | ctx.sp = config.base + config.kernel_size - 8; |
95 | ctx.sp = config.base + config.kernel_size - 8; |
96 | ctx.pc = (__address) main_bsp_separated_stack; |
96 | ctx.pc = (__address) main_bsp_separated_stack; |
97 | context_restore(&ctx); |
97 | context_restore(&ctx); /* There is no nead to load FPU context */ |
98 | /* not reached */ |
98 | /* not reached */ |
99 | } |
99 | } |
100 | 100 | ||
101 | void main_bsp_separated_stack(void) { |
101 | void main_bsp_separated_stack(void) { |
102 | vm_t *m; |
102 | vm_t *m; |
Line 190... | Line 190... | ||
190 | * collide with another CPU coming up. To prevent this, we |
190 | * collide with another CPU coming up. To prevent this, we |
191 | * switch to this cpu's private stack prior to waking kmp up. |
191 | * switch to this cpu's private stack prior to waking kmp up. |
192 | */ |
192 | */ |
193 | CPU->saved_context.sp = (__address) &CPU->stack[CPU_STACK_SIZE-8]; |
193 | CPU->saved_context.sp = (__address) &CPU->stack[CPU_STACK_SIZE-8]; |
194 | CPU->saved_context.pc = (__address) main_ap_separated_stack; |
194 | CPU->saved_context.pc = (__address) main_ap_separated_stack; |
195 | context_restore(&CPU->saved_context); |
195 | context_restore(&CPU->saved_context); /* There is no nead to load FPU context */ |
196 | /* not reached */ |
196 | /* not reached */ |
197 | } |
197 | } |
198 | 198 | ||
199 | void main_ap_separated_stack(void) |
199 | void main_ap_separated_stack(void) |
200 | { |
200 | { |