diff --git a/sched/init/nx_smpstart.c b/sched/init/nx_smpstart.c index ae45a071176..32a009f14bb 100644 --- a/sched/init/nx_smpstart.c +++ b/sched/init/nx_smpstart.c @@ -33,6 +33,7 @@ #include #include #include +#include #include "group/group.h" #include "sched/sched.h" @@ -130,6 +131,7 @@ int nx_smp_start(void) /* Initialize the processor-specific portion of the TCB */ up_initial_state(tcb); + up_stack_frame(tcb, sizeof(struct task_info_s)); } /* Then start all of the other CPUs after we have completed the memory diff --git a/sched/init/nx_start.c b/sched/init/nx_start.c index 21cfea29039..d8534e60c09 100644 --- a/sched/init/nx_start.c +++ b/sched/init/nx_start.c @@ -44,6 +44,7 @@ #include #include #include +#include #include "sched/sched.h" #include "signal/signal.h" @@ -518,6 +519,7 @@ void nx_start(void) if (cpu == 0) { up_initial_state(&g_idletcb[cpu].cmn); + up_stack_frame(&g_idletcb[cpu].cmn, sizeof(struct task_info_s)); } }