forked from Imagelibrary/rtems
bsp/realview-pbx-a9: Fix SMP startup
This commit is contained in:
@@ -55,6 +55,20 @@ BSP_START_TEXT_SECTION static void setup_mmu_and_cache(void)
|
|||||||
|
|
||||||
BSP_START_TEXT_SECTION void bsp_start_hook_0(void)
|
BSP_START_TEXT_SECTION void bsp_start_hook_0(void)
|
||||||
{
|
{
|
||||||
|
#ifdef RTEMS_SMP
|
||||||
|
uint32_t cpu_id = arm_cortex_a9_get_multiprocessor_cpu_id();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* QEMU jumps to the entry point of the ELF file on all processors. Prevent
|
||||||
|
* a SMP_FATAL_MULTITASKING_START_ON_INVALID_PROCESSOR this way.
|
||||||
|
*/
|
||||||
|
if ( cpu_id >= rtems_configuration_get_maximum_processors() ) {
|
||||||
|
while (true) {
|
||||||
|
_ARM_Wait_for_event();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
arm_a9mpcore_start_hook_0();
|
arm_a9mpcore_start_hook_0();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user