PatchworkOS
Loading...
Searching...
No Matches
trampoline.c File Reference

Go to the source code of this file.

Functions

void trampoline_init (void)
 Initializes the trampoline by copying the trampoline code to its designated memory location.
 
void trampoline_deinit (void)
 Deinitializes the trampoline by restoring the original contents of the trampoline memory location.
 
void trampoline_send_startup_ipi (cpu_t *cpu, cpuid_t id, lapic_id_t lapicId)
 Sends the startup IPI to a CPU to start it up.
 
uint64_t trampoline_wait_ready (clock_t timeout)
 Waits for the currently starting CPU to signal that it is ready.
 
static void trampoline_after_jump (void)
 
void trampoline_c_entry (cpu_t *cpu, cpuid_t cpuId)
 After the trampoline is done with basic initialization, it calls this C entry point to continue CPU initialization.
 

Variables

static void * backupBuffer
 
static void * trampolineStack
 
static atomic_bool cpuReadyFlag
 

Function Documentation

◆ trampoline_after_jump()

static void trampoline_after_jump ( void  )
static

Definition at line 93 of file trampoline.c.

References atomic_store, cpuReadyFlag, and sched_idle_loop().

Referenced by trampoline_c_entry().

Variable Documentation

◆ backupBuffer

void* backupBuffer
static

Definition at line 18 of file trampoline.c.

Referenced by trampoline_deinit(), and trampoline_init().

◆ cpuReadyFlag

atomic_bool cpuReadyFlag
static

◆ trampolineStack

void* trampolineStack
static

Definition at line 19 of file trampoline.c.

Referenced by trampoline_deinit(), trampoline_init(), and trampoline_send_startup_ipi().