Changeset 7aaed09 in mainline for kernel/generic/src/main/kinit.c
- Timestamp:
- 2011-12-18T14:02:30Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c868e2d
- Parents:
- 3b71e84d (diff), 1761268 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/main/kinit.c
r3b71e84d r7aaed09 179 179 for (i = 0; i < init.cnt; i++) { 180 180 if (init.tasks[i].addr % FRAME_SIZE) { 181 printf("init[%zu] .addris not frame aligned\n", i);181 printf("init[%zu]: Address is not frame aligned\n", i); 182 182 programs[i].task = NULL; 183 183 continue; … … 203 203 namebuf, &programs[i]); 204 204 205 if ((rc == 0) && (programs[i].task != NULL)) { 205 if (rc == 0) { 206 if (programs[i].task != NULL) { 207 /* 208 * Set capabilities to init userspace tasks. 209 */ 210 cap_set(programs[i].task, CAP_CAP | CAP_MEM_MANAGER | 211 CAP_IO_MANAGER | CAP_IRQ_REG); 212 213 if (!ipc_phone_0) 214 ipc_phone_0 = &programs[i].task->answerbox; 215 } 216 206 217 /* 207 * Set capabilities to init userspace tasks. 218 * If programs[i].task == NULL then it is 219 * the program loader and it was registered 220 * successfully. 208 221 */ 209 cap_set(programs[i].task, CAP_CAP | CAP_MEM_MANAGER | 210 CAP_IO_MANAGER | CAP_IRQ_REG); 211 212 if (!ipc_phone_0) 213 ipc_phone_0 = &programs[i].task->answerbox; 214 } else if (rc == 0) { 215 /* It was the program loader and was registered */ 216 } else { 217 /* RAM disk image */ 218 int rd = init_rd((rd_header_t *) init.tasks[i].addr, init.tasks[i].size); 219 220 if (rd != RE_OK) 221 printf("Init binary %zu not used (error %d)\n", i, rd); 222 } 222 } else if (i == init.cnt - 1) { 223 /* 224 * Assume the last task is the RAM disk. 225 */ 226 init_rd((void *) init.tasks[i].addr, init.tasks[i].size); 227 } else 228 printf("init[%zu]: Init binary load failed (error %d)\n", i, rc); 223 229 } 224 230
Note:
See TracChangeset
for help on using the changeset viewer.