NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
Loading...
Searching...
No Matches
neorv32_smp.h File Reference

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

Go to the source code of this file.

Functions

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(* entry_point )(void),
uint8_t * stack_memory,
size_t stack_size_bytes )

Configure and start SMP core 1.

Warning
This function can be executed on core 0 only.
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()

uint32_t neorv32_smp_whoami ( void )
inline

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

Returns
Core ID from mhartid CSR.