[rtems commit] bsp/realview-pbx-a9: Support unassigned processors
Sebastian Huber
sebh at rtems.org
Wed Jul 18 05:32:10 UTC 2018
Module: rtems
Branch: master
Commit: 1b57b7527ab10863f27f439059338f29f47d4f06
Changeset: http://git.rtems.org/rtems/commit/?id=1b57b7527ab10863f27f439059338f29f47d4f06
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Jul 18 07:14:41 2018 +0200
bsp/realview-pbx-a9: Support unassigned processors
---
bsps/arm/realview-pbx-a9/start/bspstarthooks.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/bsps/arm/realview-pbx-a9/start/bspstarthooks.c b/bsps/arm/realview-pbx-a9/start/bspstarthooks.c
index ab766e8..db55b03 100644
--- a/bsps/arm/realview-pbx-a9/start/bspstarthooks.c
+++ b/bsps/arm/realview-pbx-a9/start/bspstarthooks.c
@@ -19,6 +19,10 @@
#include <bsp/arm-cp15-start.h>
#include <bsp/arm-a9mpcore-start.h>
+#ifdef RTEMS_SMP
+#include <rtems/score/smpimpl.h>
+#endif
+
BSP_START_DATA_SECTION static const arm_cp15_start_section_config
rvpbxa9_mmu_config_table[] = {
ARMV7_CP15_START_DEFAULT_SECTIONS,
@@ -56,13 +60,17 @@ BSP_START_TEXT_SECTION static void setup_mmu_and_cache(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();
+ uint32_t cpu_index_self = _SMP_Get_current_processor();
/*
* QEMU jumps to the entry point of the ELF file on all processors. Prevent
- * a SMP_FATAL_MULTITASKING_START_ON_INVALID_PROCESSOR this way.
+ * the fatal errors SMP_FATAL_MULTITASKING_START_ON_INVALID_PROCESSOR and
+ * SMP_FATAL_MULTITASKING_START_ON_UNASSIGNED_PROCESSOR this way.
*/
- if ( cpu_id >= rtems_configuration_get_maximum_processors() ) {
+ if (
+ cpu_index_self >= rtems_configuration_get_maximum_processors()
+ || !_SMP_Should_start_processor(cpu_index_self)
+ ) {
while (true) {
_ARM_Wait_for_event();
}
More information about the vc
mailing list