94,6 → 94,12 |
0 |
}; |
|
/** Boot allocations. */ |
ballocs_t ballocs = { |
.base = NULL, |
.size = 0 |
}; |
|
context_t ctx; |
|
/* |
153,6 → 159,12 |
config.stack_base = ALIGN_UP(init.tasks[i].addr + init.tasks[i].size, config.stack_size); |
} |
|
/* Avoid placing stack on top of boot allocations. */ |
if (ballocs.size) { |
if (PA_overlaps(config.stack_base, config.stack_size, ballocs.base, ballocs.size)) |
config.stack_base = ALIGN_UP(ballocs.base + ballocs.size, PAGE_SIZE); |
} |
|
if (config.stack_base < stack_safe) |
config.stack_base = ALIGN_UP(stack_safe, PAGE_SIZE); |
|