API Reference
The NEORV32 RISC-V Processor
Loading...
Searching...
No Matches
Functions
neorv32_smp.h File Reference

Symmetric multiprocessing (SMP) library header file. More...

#include <neorv32.h>

Go to the source code of this file.

Functions

static uint32_t neorv32_smp_whoami (void)
 
Prototypes
int neorv32_smp_launch (int(*entry_point)(void), uint8_t *stack_memory, size_t stack_size_bytes)
 

Detailed Description

Symmetric multiprocessing (SMP) library header file.

Function Documentation

◆ neorv32_smp_launch()

int neorv32_smp_launch ( int(*)(void)  entry_point,
uint8_t *  stack_memory,
size_t  stack_size_bytes 
)

Configure and start secondary CPU core (core 1).

Warning
This function can be executed on core 0 only and will override MTIMECMP of hart 1.
Parameters
[in]entry_pointCore's main function; must be of type "int entry_point(void)".
[in]stack_memoryPointer to beginning of core's stack memory array.
[in]stack_size_bytesCore's stack size in bytes.
Returns
0 if launching succeeded, -1 if invalid hart ID or CLINT not available, -2 if core is not responding.

◆ neorv32_smp_whoami()

static uint32_t neorv32_smp_whoami ( void  )
inlinestatic

Get core/hart ID of the CPU that is executing this function.

Returns
Core ID from mhartid CSR.