Rev 625 | Rev 654 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 625 | Rev 629 | ||
|---|---|---|---|
| Line 160... | Line 160... | ||
| 160 | */ |
160 | */ |
| 161 | a = vm_area_create(m, VMA_TEXT, 1, UTEXT_ADDRESS); |
161 | a = vm_area_create(m, VMA_TEXT, 1, UTEXT_ADDRESS); |
| 162 | if (!a) |
162 | if (!a) |
| 163 | panic("vm_area_create: vm_text\n"); |
163 | panic("vm_area_create: vm_text\n"); |
| 164 | vm_area_map(a, m); |
164 | vm_area_map(a, m); |
| - | 165 | if (config.init_size > 0) |
|
| - | 166 | memcpy((void *) PA2KA(a->mapping[0]), (void *) config.init_addr, config.init_size < PAGE_SIZE ? config.init_size : PAGE_SIZE); |
|
| - | 167 | else |
|
| 165 | memcpy((void *) PA2KA(a->mapping[0]), (void *) utext, utext_size < PAGE_SIZE ? utext_size : PAGE_SIZE); |
168 | memcpy((void *) PA2KA(a->mapping[0]), (void *) utext, utext_size < PAGE_SIZE ? utext_size : PAGE_SIZE); |
| 166 | 169 | ||
| 167 | /* |
170 | /* |
| 168 | * Create the data vm_area. |
171 | * Create the data vm_area. |
| 169 | */ |
172 | */ |
| 170 | a = vm_area_create(m, VMA_STACK, 1, USTACK_ADDRESS); |
173 | a = vm_area_create(m, VMA_STACK, 1, USTACK_ADDRESS); |