. unnecessary to do it manually with ELF
. also makes 1 extra alignment page unnecessary
void arch_init(void)
{
- /* FIXME stupid a.out
- * align the stacks in the stack are to the K_STACK_SIZE which is a
- * power of 2
- */
- k_stacks = (void*) (((vir_bytes)&k_stacks_start + K_STACK_SIZE - 1) &
- ~(K_STACK_SIZE - 1));
+ k_stacks = (void*) &k_stacks_start;
+ assert(!((vir_bytes) k_stacks % K_STACK_SIZE));
#ifndef CONFIG_SMP
/*
LABEL(k_stacks_start)
/* two pages for each stack, one for data, other as a sandbox */
-.space 2 * (K_STACK_SIZE * (CONFIG_MAX_CPUS + 1))
+.space 2 * (K_STACK_SIZE * CONFIG_MAX_CPUS)
LABEL(k_stacks_end)