Rev 2260 | Rev 2283 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2260 | Rev 2265 | ||
---|---|---|---|
Line 79... | Line 79... | ||
79 | #include <macros.h> |
79 | #include <macros.h> |
80 | #include <adt/btree.h> |
80 | #include <adt/btree.h> |
81 | #include <console/klog.h> |
81 | #include <console/klog.h> |
82 | #include <smp/smp.h> |
82 | #include <smp/smp.h> |
83 | #include <ddi/ddi.h> |
83 | #include <ddi/ddi.h> |
84 | #include <ddi/tasklet.h> |
84 | #include <proc/tasklet.h> |
85 | 85 | ||
86 | /** Global configuration structure. */ |
86 | /** Global configuration structure. */ |
87 | config_t config; |
87 | config_t config; |
88 | 88 | ||
89 | /** Initial user-space tasks */ |
89 | /** Initial user-space tasks */ |
Line 218... | Line 218... | ||
218 | as_init(); |
218 | as_init(); |
219 | page_init(); |
219 | page_init(); |
220 | tlb_init(); |
220 | tlb_init(); |
221 | ddi_init(); |
221 | ddi_init(); |
222 | tasklet_init(); |
222 | tasklet_init(); |
223 | // tasklet_do(); |
- | |
224 | arch_post_mm_init(); |
223 | arch_post_mm_init(); |
225 | 224 | ||
226 | version_print(); |
225 | version_print(); |
227 | printf("kernel: %.*p hardcoded_ktext_size=%zdK, " |
226 | printf("kernel: %.*p hardcoded_ktext_size=%zdK, " |
228 | "hardcoded_kdata_size=%zdK\n", sizeof(uintptr_t) * 2, |
227 | "hardcoded_kdata_size=%zdK\n", sizeof(uintptr_t) * 2, |
Line 240... | Line 239... | ||
240 | printf("config.cpu_count=%zd\n", config.cpu_count); |
239 | printf("config.cpu_count=%zd\n", config.cpu_count); |
241 | cpu_init(); |
240 | cpu_init(); |
242 | 241 | ||
243 | calibrate_delay_loop(); |
242 | calibrate_delay_loop(); |
244 | clock_counter_init(); |
243 | clock_counter_init(); |
245 | // tasklet_do(); |
- | |
246 | timeout_init(); |
244 | timeout_init(); |
247 | scheduler_init(); |
245 | scheduler_init(); |
248 | task_init(); |
246 | task_init(); |
249 | thread_init(); |
247 | thread_init(); |
250 | futex_init(); |
248 | futex_init(); |
Line 257... | Line 255... | ||
257 | printf("init[%zd].addr=%.*p, init[%zd].size=%zd\n", i, |
255 | printf("init[%zd].addr=%.*p, init[%zd].size=%zd\n", i, |
258 | sizeof(uintptr_t) * 2, init.tasks[i].addr, i, |
256 | sizeof(uintptr_t) * 2, init.tasks[i].addr, i, |
259 | init.tasks[i].size); |
257 | init.tasks[i].size); |
260 | } else |
258 | } else |
261 | printf("No init binaries found\n"); |
259 | printf("No init binaries found\n"); |
262 | - | ||
263 | ipc_init(); |
260 | ipc_init(); |
264 | //tasklet_do(); |
- | |
265 | 261 | ||
266 | /* |
262 | /* |
267 | * Create kernel task. |
263 | * Create kernel task. |
268 | */ |
264 | */ |
269 | k = task_create(AS_KERNEL, "kernel"); |
265 | k = task_create(AS_KERNEL, "kernel"); |
Line 276... | Line 272... | ||
276 | t = thread_create(kinit, NULL, k, 0, "kinit", true); |
272 | t = thread_create(kinit, NULL, k, 0, "kinit", true); |
277 | if (!t) |
273 | if (!t) |
278 | panic("can't create kinit thread\n"); |
274 | panic("can't create kinit thread\n"); |
279 | thread_ready(t); |
275 | thread_ready(t); |
280 | 276 | ||
- | 277 | //tasklets disabled for debugging purposes |
|
281 | tasklet_run_tasklet_thread(k); |
278 | //tasklet_run_tasklet_thread(k); |
282 | 279 | ||
283 | /* |
280 | /* |
284 | * This call to scheduler() will return to kinit, |
281 | * This call to scheduler() will return to kinit, |
285 | * starting the thread of kernel threads. |
282 | * starting the thread of kernel threads. |
286 | */ |
283 | */ |