Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion arch/x86_64/src/intel64/intel64_cpustart.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <nuttx/arch.h>
#include <nuttx/spinlock.h>

#include "sched/sched.h"
#include "init/init.h"

#include "intel64_lowsetup.h"
Expand Down Expand Up @@ -128,8 +129,11 @@ static int x86_64_ap_startup(int cpu)

void x86_64_ap_boot(void)
{
struct tcb_s *tcb = this_task();
uint8_t cpu = 0;

UNUSED(tcb);

/* Do some checking on CPU compatibilities at the top of this function */

x86_64_check_and_enable_capability();
Expand All @@ -153,7 +157,7 @@ void x86_64_ap_boot(void)
#ifdef CONFIG_SCHED_INSTRUMENTATION
/* Notify that this CPU has started */

sched_note_cpu_started(this_task());
sched_note_cpu_started(tcb);
#endif

sinfo("cpu=%d\n", cpu);
Expand All @@ -165,6 +169,15 @@ void x86_64_ap_boot(void)
up_enable_irq(SMP_IPI_IRQ);
up_enable_irq(SMP_IPI_ASYNC_IRQ);

#ifdef CONFIG_STACK_COLORATION
/* If stack debug is enabled, then fill the stack with a
* recognizable value that we can use later to test for high
* water marks.
*/

x86_64_stack_color(tcb->stack_alloc_ptr, 0);
#endif

/* CPU ready */

x86_64_cpu_ready_set(cpu);
Expand Down