Changes in kernel/generic/src/main/kinit.c [221c9ec:fb48a0e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/main/kinit.c
r221c9ec rfb48a0e 57 57 #include <mm/as.h> 58 58 #include <mm/frame.h> 59 #include <mm/km.h>60 59 #include <print.h> 61 60 #include <memstr.h> … … 69 68 #include <str.h> 70 69 #include <sysinfo/stats.h> 71 #include <align.h>72 70 73 71 #ifdef CONFIG_SMP … … 180 178 181 179 for (i = 0; i < init.cnt; i++) { 182 if (init.tasks[i]. paddr % FRAME_SIZE) {180 if (init.tasks[i].addr % FRAME_SIZE) { 183 181 printf("init[%zu]: Address is not frame aligned\n", i); 184 182 programs[i].task = NULL; … … 201 199 str_cpy(namebuf + INIT_PREFIX_LEN, 202 200 TASK_NAME_BUFLEN - INIT_PREFIX_LEN, name); 203 204 /* 205 * Create virtual memory mappings for init task images. 206 */ 207 uintptr_t page = km_map(init.tasks[i].paddr, 208 init.tasks[i].size, 209 PAGE_READ | PAGE_WRITE | PAGE_CACHEABLE); 210 ASSERT(page); 211 212 int rc = program_create_from_image((void *) page, namebuf, 213 &programs[i]); 201 202 int rc = program_create_from_image((void *) init.tasks[i].addr, 203 namebuf, &programs[i]); 214 204 215 205 if (rc == 0) { … … 234 224 * Assume the last task is the RAM disk. 235 225 */ 236 init_rd((void *) init.tasks[i]. paddr, init.tasks[i].size);226 init_rd((void *) init.tasks[i].addr, init.tasks[i].size); 237 227 } else 238 228 printf("init[%zu]: Init binary load failed (error %d)\n", i, rc);
Note:
See TracChangeset
for help on using the changeset viewer.