Rev 822 | Rev 955 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 822 | Rev 860 | ||
|---|---|---|---|
| Line 179... | Line 179... | ||
| 179 | slab_enable_cpucache(); |
179 | slab_enable_cpucache(); |
| 180 | 180 | ||
| 181 | printf("config.memory_size=%dM\n", config.memory_size/(1024*1024)); |
181 | printf("config.memory_size=%dM\n", config.memory_size/(1024*1024)); |
| 182 | printf("config.cpu_count=%d\n", config.cpu_count); |
182 | printf("config.cpu_count=%d\n", config.cpu_count); |
| 183 | cpu_init(); |
183 | cpu_init(); |
| 184 | 184 | ||
| 185 | calibrate_delay_loop(); |
185 | calibrate_delay_loop(); |
| 186 | timeout_init(); |
186 | timeout_init(); |
| 187 | scheduler_init(); |
187 | scheduler_init(); |
| 188 | task_init(); |
188 | task_init(); |
| 189 | thread_init(); |
189 | thread_init(); |
| Line 195... | Line 195... | ||
| 195 | * Create kernel task. |
195 | * Create kernel task. |
| 196 | */ |
196 | */ |
| 197 | k = task_create(AS_KERNEL); |
197 | k = task_create(AS_KERNEL); |
| 198 | if (!k) |
198 | if (!k) |
| 199 | panic("can't create kernel task\n"); |
199 | panic("can't create kernel task\n"); |
| 200 | 200 | ||
| 201 | /* |
201 | /* |
| 202 | * Create the first thread. |
202 | * Create the first thread. |
| 203 | */ |
203 | */ |
| 204 | t = thread_create(kinit, NULL, k, 0); |
204 | t = thread_create(kinit, NULL, k, 0); |
| 205 | if (!t) |
205 | if (!t) |
| 206 | panic("can't create kinit thread\n"); |
206 | panic("can't create kinit thread\n"); |
| 207 | thread_ready(t); |
207 | thread_ready(t); |
| 208 | 208 | ||
| 209 | /* |
209 | /* |
| 210 | * This call to scheduler() will return to kinit, |
210 | * This call to scheduler() will return to kinit, |
| 211 | * starting the thread of kernel threads. |
211 | * starting the thread of kernel threads. |
| 212 | */ |
212 | */ |
| 213 | scheduler(); |
213 | scheduler(); |