Rev 4389 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4389 | Rev 4691 | ||
---|---|---|---|
Line 151... | Line 151... | ||
151 | 151 | ||
152 | /* Initialy the stack is placed just after the kernel */ |
152 | /* Initialy the stack is placed just after the kernel */ |
153 | config.stack_base = config.base + config.kernel_size; |
153 | config.stack_base = config.base + config.kernel_size; |
154 | 154 | ||
155 | /* Avoid placing stack on top of init */ |
155 | /* Avoid placing stack on top of init */ |
156 | count_t i; |
156 | size_t i; |
157 | for (i = 0; i < init.cnt; i++) { |
157 | for (i = 0; i < init.cnt; i++) { |
158 | if (PA_overlaps(config.stack_base, config.stack_size, |
158 | if (PA_overlaps(config.stack_base, config.stack_size, |
159 | init.tasks[i].addr, init.tasks[i].size)) |
159 | init.tasks[i].addr, init.tasks[i].size)) |
160 | config.stack_base = ALIGN_UP(init.tasks[i].addr + |
160 | config.stack_base = ALIGN_UP(init.tasks[i].addr + |
161 | init.tasks[i].size, config.stack_size); |
161 | init.tasks[i].size, config.stack_size); |
Line 231... | Line 231... | ||
231 | LOG_EXEC(smp_init()); |
231 | LOG_EXEC(smp_init()); |
232 | 232 | ||
233 | /* Slab must be initialized after we know the number of processors. */ |
233 | /* Slab must be initialized after we know the number of processors. */ |
234 | LOG_EXEC(slab_enable_cpucache()); |
234 | LOG_EXEC(slab_enable_cpucache()); |
235 | 235 | ||
236 | printf("Detected %" PRIc " CPU(s), %" PRIu64" MiB free memory\n", |
236 | printf("Detected %" PRIs " CPU(s), %" PRIu64" MiB free memory\n", |
237 | config.cpu_count, SIZE2MB(zone_total_size())); |
237 | config.cpu_count, SIZE2MB(zone_total_size())); |
238 | 238 | ||
239 | LOG_EXEC(cpu_init()); |
239 | LOG_EXEC(cpu_init()); |
240 | 240 | ||
241 | LOG_EXEC(calibrate_delay_loop()); |
241 | LOG_EXEC(calibrate_delay_loop()); |
Line 245... | Line 245... | ||
245 | LOG_EXEC(task_init()); |
245 | LOG_EXEC(task_init()); |
246 | LOG_EXEC(thread_init()); |
246 | LOG_EXEC(thread_init()); |
247 | LOG_EXEC(futex_init()); |
247 | LOG_EXEC(futex_init()); |
248 | 248 | ||
249 | if (init.cnt > 0) { |
249 | if (init.cnt > 0) { |
250 | count_t i; |
250 | size_t i; |
251 | for (i = 0; i < init.cnt; i++) |
251 | for (i = 0; i < init.cnt; i++) |
252 | LOG("init[%" PRIc "].addr=%#" PRIp ", init[%" PRIc |
252 | LOG("init[%" PRIs "].addr=%#" PRIp ", init[%" PRIs |
253 | "].size=%#" PRIs, i, init.tasks[i].addr, i, |
253 | "].size=%#" PRIs, i, init.tasks[i].addr, i, |
254 | init.tasks[i].size); |
254 | init.tasks[i].size); |
255 | } else |
255 | } else |
256 | printf("No init binaries found.\n"); |
256 | printf("No init binaries found.\n"); |
257 | 257 |