mirror of
https://github.com/apache/nuttx.git
synced 2026-08-27 04:10:40 +00:00
arch/x86_64: drop unused gap below the intel64 idle stacks
The idle stack area started at _ebss + CONFIG_IDLETHREAD_STACKSIZE * CONFIG_SMP_NCPUS, so the first CONFIG_SMP_NCPUS stack slots after .bss were never used - 16MiB on a 4-CPU configuration with a 4MiB idle stack. Start the area at _ebss and let the heap begin that much earlier. The -16 offset is kept: it is what places the AP initial RSP set up in intel64_head.S below the xcp->regs block that up_cpu_idlestack() reserves at the top of the same stack. Without it both land on the same 64-byte slot and the first context save corrupts the AP stack. Signed-off-by: raiden00pl <raiden00@railab.me> Assisted-by: Claude Code
This commit is contained in:
parent
1a0586826e
commit
3be03008ac
1 changed files with 1 additions and 1 deletions
|
|
@ -56,7 +56,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
const uintptr_t g_idle_topstack = (uintptr_t)_ebss +
|
||||
(uintptr_t)CONFIG_IDLETHREAD_STACKSIZE * (CONFIG_SMP_NCPUS + 1) - 16;
|
||||
CONFIG_IDLETHREAD_STACKSIZE - 16;
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_allocate_heap
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue