Rev 1901 | Rev 2000 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1901 | Rev 1999 | ||
---|---|---|---|
Line 59... | Line 59... | ||
59 | #include <memstr.h> |
59 | #include <memstr.h> |
60 | #include <console/console.h> |
60 | #include <console/console.h> |
61 | #include <interrupt.h> |
61 | #include <interrupt.h> |
62 | #include <console/kconsole.h> |
62 | #include <console/kconsole.h> |
63 | #include <security/cap.h> |
63 | #include <security/cap.h> |
- | 64 | #include <mm/rd.h> |
|
64 | 65 | ||
65 | #ifdef CONFIG_SMP |
66 | #ifdef CONFIG_SMP |
66 | #include <smp/smp.h> |
67 | #include <smp/smp.h> |
67 | #endif /* CONFIG_SMP */ |
68 | #endif /* CONFIG_SMP */ |
68 | 69 | ||
Line 156... | Line 157... | ||
156 | #ifdef CONFIG_TEST |
157 | #ifdef CONFIG_TEST |
157 | test(); |
158 | test(); |
158 | printf("\nTest finished, please reboot.\n"); |
159 | printf("\nTest finished, please reboot.\n"); |
159 | #else /* CONFIG_TEST */ |
160 | #else /* CONFIG_TEST */ |
160 | 161 | ||
161 | task_t *utask; |
- | |
162 | count_t i; |
162 | count_t i; |
163 | for (i = 0; i < init.cnt; i++) { |
163 | for (i = 0; i < init.cnt; i++) { |
164 | /* |
164 | /* |
165 | * Run user tasks. |
165 | * Run user tasks, load RAM disk images. |
166 | */ |
166 | */ |
167 | 167 | ||
168 | if (init.tasks[i].addr % FRAME_SIZE) |
168 | if (init.tasks[i].addr % FRAME_SIZE) { |
169 | panic("init[%d].addr is not frame aligned", i); |
169 | printf("init[%d].addr is not frame aligned", i); |
- | 170 | continue; |
|
- | 171 | } |
|
170 | 172 | ||
171 | utask = task_run_program((void *) init.tasks[i].addr, "USPACE"); |
173 | task_t *utask = task_run_program((void *) init.tasks[i].addr, "USPACE"); |
172 | if (utask) { |
174 | if (utask) { |
173 | /* |
175 | /* |
174 | * Set capabilities to init userspace tasks. |
176 | * Set capabilities to init userspace tasks. |
175 | */ |
177 | */ |
176 | cap_set(utask, CAP_CAP | CAP_MEM_MANAGER | CAP_IO_MANAGER | CAP_PREEMPT_CONTROL | CAP_IRQ_REG); |
178 | cap_set(utask, CAP_CAP | CAP_MEM_MANAGER | CAP_IO_MANAGER | CAP_PREEMPT_CONTROL | CAP_IRQ_REG); |
177 | 179 | ||
178 | if (!ipc_phone_0) |
180 | if (!ipc_phone_0) |
179 | ipc_phone_0 = &utask->answerbox; |
181 | ipc_phone_0 = &utask->answerbox; |
180 | } else |
182 | } else { |
- | 183 | bool rd = init_rd((void *) init.tasks[i].addr); |
|
- | 184 | ||
- | 185 | if (!rd) |
|
181 | printf("Init task %zd not started.\n", i); |
186 | printf("Init binary %zd not used.\n", i); |
- | 187 | } |
|
182 | } |
188 | } |
183 | 189 | ||
184 | 190 | ||
185 | if (!stdin) { |
191 | if (!stdin) { |
186 | while (1) { |
192 | while (1) { |