Rev 184 | Rev 207 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 184 | Rev 192 | ||
---|---|---|---|
Line 177... | Line 177... | ||
177 | /* |
177 | /* |
178 | * Create the first thread. |
178 | * Create the first thread. |
179 | */ |
179 | */ |
180 | t = thread_create(kinit, NULL, k, 0); |
180 | t = thread_create(kinit, NULL, k, 0); |
181 | if (!t) panic("can't create kinit thread\n"); |
181 | if (!t) panic("can't create kinit thread\n"); |
182 | - | ||
183 | thread_ready(t); |
182 | thread_ready(t); |
184 | 183 | ||
185 | /* |
184 | /* |
186 | * This call to scheduler() will return to kinit, |
185 | * This call to scheduler() will return to kinit, |
187 | * starting the thread of kernel threads. |
186 | * starting the thread of kernel threads. |
Line 208... | Line 207... | ||
208 | * Neither frame_init() will do the complete thing. Neither cpu_init() |
207 | * Neither frame_init() will do the complete thing. Neither cpu_init() |
209 | * will do. |
208 | * will do. |
210 | */ |
209 | */ |
211 | config.cpu_active++; |
210 | config.cpu_active++; |
212 | 211 | ||
- | 212 | /* |
|
- | 213 | * The THE structure is well defined because ctx.sp is used as stack. |
|
- | 214 | */ |
|
- | 215 | the_initialize(THE); |
|
- | 216 | ||
213 | arch_pre_mm_init(); |
217 | arch_pre_mm_init(); |
214 | frame_init(); |
218 | frame_init(); |
215 | page_init(); |
219 | page_init(); |
216 | arch_post_mm_init(); |
220 | arch_post_mm_init(); |
217 | 221 | ||
Line 219... | Line 223... | ||
219 | calibrate_delay_loop(); |
223 | calibrate_delay_loop(); |
220 | 224 | ||
221 | l_apic_init(); |
225 | l_apic_init(); |
222 | l_apic_debug(); |
226 | l_apic_debug(); |
223 | 227 | ||
- | 228 | the_copy(THE, (the_t *) CPU->stack); |
|
224 | 229 | ||
225 | /* |
230 | /* |
226 | * If we woke kmp up before we left the kernel stack, we could |
231 | * If we woke kmp up before we left the kernel stack, we could |
227 | * collide with another CPU coming up. To prevent this, we |
232 | * collide with another CPU coming up. To prevent this, we |
228 | * switch to this cpu's private stack prior to waking kmp up. |
233 | * switch to this cpu's private stack prior to waking kmp up. |