forked from Imagelibrary/rtems
@@ -55,6 +55,11 @@ void _CPU_SMP_Finalize_initialization(uint32_t cpu_count)
|
||||
}
|
||||
}
|
||||
|
||||
void _CPU_SMP_Prepare_start_multitasking( void )
|
||||
{
|
||||
/* Do nothing */
|
||||
}
|
||||
|
||||
void _CPU_SMP_Send_interrupt( uint32_t target_processor_index )
|
||||
{
|
||||
arm_gic_irq_generate_software_irq(
|
||||
|
||||
@@ -228,6 +228,11 @@ void _CPU_SMP_Finalize_initialization(uint32_t cpu_count)
|
||||
}
|
||||
}
|
||||
|
||||
void _CPU_SMP_Prepare_start_multitasking(void)
|
||||
{
|
||||
/* Do nothing */
|
||||
}
|
||||
|
||||
void _CPU_SMP_Send_interrupt(uint32_t target_processor_index)
|
||||
{
|
||||
qoriq.pic.ipidr [IPI_INDEX].reg = 1U << target_processor_index;
|
||||
|
||||
@@ -26,6 +26,10 @@ void _CPU_SMP_Finalize_initialization( uint32_t cpu_count )
|
||||
{
|
||||
}
|
||||
|
||||
void _CPU_SMP_Prepare_start_multitasking( void )
|
||||
{
|
||||
}
|
||||
|
||||
void _CPU_SMP_Send_interrupt( uint32_t target_processor_index )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -86,16 +86,13 @@ void _CPU_SMP_Finalize_initialization( uint32_t cpu_count )
|
||||
/* Nothing to do */
|
||||
}
|
||||
|
||||
void _CPU_SMP_Prepare_start_multitasking( void )
|
||||
{
|
||||
_CPU_cache_invalidate_entire_instruction();
|
||||
}
|
||||
|
||||
void _CPU_SMP_Send_interrupt(uint32_t target_processor_index)
|
||||
{
|
||||
/* send interrupt to destination CPU */
|
||||
LEON3_IrqCtrl_Regs->force[target_processor_index] = 1 << LEON3_mp_irq;
|
||||
}
|
||||
|
||||
void _LEON3_Start_multitasking(
|
||||
Context_Control *heir
|
||||
)
|
||||
{
|
||||
_CPU_cache_invalidate_entire_instruction();
|
||||
_CPU_Context_Restart_self( heir );
|
||||
}
|
||||
|
||||
@@ -504,6 +504,8 @@ void _CPU_Context_validate( uintptr_t pattern );
|
||||
|
||||
void _CPU_SMP_Finalize_initialization( uint32_t cpu_count );
|
||||
|
||||
void _CPU_SMP_Prepare_start_multitasking( void );
|
||||
|
||||
static inline uint32_t _CPU_SMP_Get_current_processor( void )
|
||||
{
|
||||
uint32_t mpidr;
|
||||
|
||||
@@ -494,6 +494,8 @@ uint32_t _CPU_ISR_Get_level( void );
|
||||
|
||||
void _CPU_SMP_Finalize_initialization( uint32_t cpu_count );
|
||||
|
||||
void _CPU_SMP_Prepare_start_multitasking( void );
|
||||
|
||||
uint32_t _CPU_SMP_Get_current_processor( void );
|
||||
|
||||
void _CPU_SMP_Send_interrupt( uint32_t target_processor_index );
|
||||
|
||||
@@ -1573,6 +1573,18 @@ register struct Per_CPU_Control *_CPU_Per_CPU_current asm( "rX" );
|
||||
*/
|
||||
void _CPU_SMP_Finalize_initialization( uint32_t cpu_count );
|
||||
|
||||
/**
|
||||
* @brief Prepares a CPU to start multitasking in terms of SMP.
|
||||
*
|
||||
* This function is invoked on all processors requested by the application
|
||||
* during system initialization.
|
||||
*
|
||||
* This function will be called after all processors requested by the
|
||||
* application have been started right before the context switch to the first
|
||||
* thread takes place.
|
||||
*/
|
||||
void _CPU_SMP_Prepare_start_multitasking( void );
|
||||
|
||||
/**
|
||||
* @brief Returns the index of the current processor.
|
||||
*
|
||||
|
||||
@@ -1123,6 +1123,8 @@ void _CPU_Context_validate( uintptr_t pattern );
|
||||
|
||||
void _CPU_SMP_Finalize_initialization( uint32_t cpu_count );
|
||||
|
||||
void _CPU_SMP_Prepare_start_multitasking( void );
|
||||
|
||||
static inline uint32_t _CPU_SMP_Get_current_processor( void )
|
||||
{
|
||||
uint32_t pir;
|
||||
|
||||
@@ -1186,6 +1186,8 @@ register struct Per_CPU_Control *_SPARC_Per_CPU_current __asm__( "g6" );
|
||||
|
||||
void _CPU_SMP_Finalize_initialization( uint32_t cpu_count );
|
||||
|
||||
void _CPU_SMP_Prepare_start_multitasking( void );
|
||||
|
||||
#if defined(__leon__) && !defined(RTEMS_PARAVIRT)
|
||||
static inline uint32_t _CPU_SMP_Get_current_processor( void )
|
||||
{
|
||||
@@ -1197,12 +1199,6 @@ register struct Per_CPU_Control *_SPARC_Per_CPU_current __asm__( "g6" );
|
||||
|
||||
void _CPU_SMP_Send_interrupt( uint32_t target_processor_index );
|
||||
|
||||
#if defined(__leon__)
|
||||
void _LEON3_Start_multitasking( Context_Control *heir )
|
||||
RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
|
||||
#define _CPU_Start_multitasking _LEON3_Start_multitasking
|
||||
#endif
|
||||
|
||||
static inline void _CPU_SMP_Processor_event_broadcast( void )
|
||||
{
|
||||
__asm__ volatile ( "" : : : "memory" );
|
||||
|
||||
@@ -62,6 +62,8 @@ void _Thread_Start_multitasking( void )
|
||||
_Profiling_Thread_dispatch_disable( cpu_self, 0 );
|
||||
|
||||
#if defined(RTEMS_SMP)
|
||||
_CPU_SMP_Prepare_start_multitasking();
|
||||
|
||||
/*
|
||||
* The _CPU_Context_Restart_self() implementations usually assume that self
|
||||
* context is executing.
|
||||
|
||||
@@ -56,6 +56,11 @@ void _CPU_SMP_Finalize_initialization(uint32_t cpu_count)
|
||||
assert(0);
|
||||
}
|
||||
|
||||
void _CPU_SMP_Prepare_start_multitasking(void)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
#if defined(RTEMS_PARAVIRT) \
|
||||
|| (!defined(__leon__) && !defined(__PPC__) && !defined(__arm__))
|
||||
uint32_t _CPU_SMP_Get_current_processor(void)
|
||||
@@ -64,13 +69,6 @@ uint32_t _CPU_SMP_Get_current_processor(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__leon__)
|
||||
void _LEON3_Start_multitasking(Context_Control *heir)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
void _CPU_SMP_Send_interrupt(uint32_t target_processor_index)
|
||||
{
|
||||
(void) target_processor_index;
|
||||
|
||||
Reference in New Issue
Block a user