Changeset d1da1ff2 in mainline for kernel/generic/src/main/main.c
- Timestamp:
- 2018-11-01T22:20:13Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2e4343b
- Parents:
- a6e55886
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-01 16:25:16)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-01 22:20:13)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/main/main.c
ra6e55886 rd1da1ff2 173 173 ALIGN_UP((uintptr_t) kdata_end - config.base, PAGE_SIZE); 174 174 175 // XXX: All kernel stacks must be aligned to STACK_SIZE, 176 // see get_current(). 177 175 178 /* Place the stack after the kernel, init and ballocs. */ 176 config.stack_base = config.base + config.kernel_size; 179 config.stack_base = 180 ALIGN_UP(config.base + config.kernel_size, STACK_SIZE); 177 181 config.stack_size = STACK_SIZE; 178 182 … … 181 185 for (i = 0; i < init.cnt; i++) { 182 186 uintptr_t p = init.tasks[i].paddr + init.tasks[i].size; 183 uintptr_t bottom = PA2KA(ALIGN_UP(p, PAGE_SIZE));187 uintptr_t bottom = PA2KA(ALIGN_UP(p, STACK_SIZE)); 184 188 185 189 if (config.stack_base < bottom) … … 190 194 if (ballocs.size) { 191 195 uintptr_t bottom = 192 ALIGN_UP(ballocs.base + ballocs.size, PAGE_SIZE);196 ALIGN_UP(ballocs.base + ballocs.size, STACK_SIZE); 193 197 if (config.stack_base < bottom) 194 198 config.stack_base = bottom; … … 196 200 197 201 if (config.stack_base < stack_safe) 198 config.stack_base = ALIGN_UP(stack_safe, PAGE_SIZE);202 config.stack_base = ALIGN_UP(stack_safe, STACK_SIZE); 199 203 200 204 context_save(&ctx);
Note:
See TracChangeset
for help on using the changeset viewer.