summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/no_cpu/rtems/score
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-10 15:48:05 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-14 08:37:04 +0200
commit53e008b6fda8ccd1cdcf0f000bbccf1d3788206b (patch)
tree09adbf721ce5e3356ed61e4ee59a767994810873 /cpukit/score/cpu/no_cpu/rtems/score
parentscore: Add _Per_CPU_Get_snapshot() (diff)
downloadrtems-53e008b6fda8ccd1cdcf0f000bbccf1d3788206b.tar.bz2
score: SMP initialization changes
Add and use _CPU_SMP_Start_processor(). Add and use _CPU_SMP_Finalize_initialization(). This makes most _CPU_SMP_Initialize() functions a bit simpler since we can calculate the minimum value of the count of processors requested by the application configuration and the count of physically or virtually available processors in the high-level code. The CPU port has now the ability to signal a processor start failure. With the support for clustered/partitioned scheduling the presence of particular processors can be configured to be optional or mandatory. There will be a fatal error only in case mandatory processors are not present. The CPU port may use a timeout to monitor the start of a processor.
Diffstat (limited to 'cpukit/score/cpu/no_cpu/rtems/score')
-rw-r--r--cpukit/score/cpu/no_cpu/rtems/score/cpu.h44
1 files changed, 36 insertions, 8 deletions
diff --git a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
index c864164667..5241b5ba5d 100644
--- a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
+++ b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
@@ -1467,19 +1467,47 @@ CPU_Counter_ticks _CPU_Counter_difference(
* @brief Performs CPU specific SMP initialization in the context of the boot
* processor.
*
- * This function is invoked on the boot processor by RTEMS during
+ * This function is invoked on the boot processor during system
* initialization. All interrupt stacks are allocated at this point in case
- * the CPU port allocates the interrupt stacks.
+ * the CPU port allocates the interrupt stacks. This function is called
+ * before _CPU_SMP_Start_processor() or _CPU_SMP_Finalize_initialization() is
+ * used.
*
- * The CPU port should start secondary processors now.
+ * @return The count of physically or virtually available processors.
+ * Depending on the configuration the application may use not all processors.
+ */
+ uint32_t _CPU_SMP_Initialize( void );
+
+ /**
+ * @brief Starts a processor specified by its index.
+ *
+ * This function is invoked on the boot processor during system
+ * initialization.
+ *
+ * This function will be called after _CPU_SMP_Initialize().
+ *
+ * @param[in] cpu_index The processor index.
+ *
+ * @retval true Successful operation.
+ * @retval false Unable to start this processor.
+ */
+ bool _CPU_SMP_Start_processor( uint32_t cpu_index );
+
+ /**
+ * @brief Performs final steps of CPU specific SMP initialization in the
+ * context of the boot processor.
+ *
+ * This function is invoked on the boot processor during system
+ * initialization.
*
- * @param[in] configured_cpu_count The count of processors requested by the
- * application configuration.
+ * This function will be called after all processors requested by the
+ * application have been started.
*
- * @return The count of processors available for the application in the system.
- * This value is less than or equal to the configured count of processors.
+ * @param[in] cpu_count The minimum value of the count of processors
+ * requested by the application configuration and the count of physically or
+ * virtually available processors.
*/
- uint32_t _CPU_SMP_Initialize( uint32_t configured_cpu_count );
+ void _CPU_SMP_Finalize_initialization( uint32_t cpu_count );
/**
* @brief Returns the index of the current processor.