18 #include <bsp/fatal.h> 24 #if !defined(__leon__) || defined(RTEMS_PARAVIRT) 25 uint32_t _CPU_SMP_Get_current_processor(
void )
27 return _LEON3_Get_current_processor();
31 static rtems_isr bsp_inter_processor_interrupt(
40 uint32_t cpu_index_self;
48 if ( !leon3_data_cache_snooping_enabled() )
49 BSP_fatal_exit( LEON3_FATAL_INVALID_CACHE_CONFIG_SECONDARY_PROCESSOR );
52 cpu_index_self = _Per_CPU_Get_index(cpu_self);
53 LEON3_IrqCtrl_Regs->mask[cpu_index_self] |= 1U << LEON3_mp_irq;
58 uint32_t _CPU_SMP_Initialize(
void )
60 if ( !leon3_data_cache_snooping_enabled() )
61 bsp_fatal( LEON3_FATAL_INVALID_CACHE_CONFIG_MAIN_PROCESSOR );
63 LEON_Unmask_interrupt(LEON3_mp_irq);
64 set_vector(bsp_inter_processor_interrupt, LEON_TRAP_TYPE(LEON3_mp_irq), 1);
66 return leon3_get_cpu_count(LEON3_IrqCtrl_Regs);
69 bool _CPU_SMP_Start_processor( uint32_t cpu_index )
71 #if defined(RTEMS_DEBUG) 72 printk(
"Waking CPU %d\n", cpu_index );
75 LEON3_IrqCtrl_Regs->mpstat = 1U << cpu_index;
80 void _CPU_SMP_Finalize_initialization( uint32_t cpu_count )
87 void _CPU_SMP_Prepare_start_multitasking(
void )
92 void _CPU_SMP_Send_interrupt(uint32_t target_processor_index)
95 LEON3_IrqCtrl_Regs->force[target_processor_index] = 1 << LEON3_mp_irq;
void _SMP_Start_multitasking_on_secondary_processor(Per_CPU_Control *cpu_self) RTEMS_NO_RETURN
Performs high-level initialization of a secondary processor and runs the application threads...
LEON3 BSP data types and macros.
void bsp_start_on_secondary_processor(Per_CPU_Control *cpu_self)
Standard start routine for secondary processors.
Interface to Kernel Print Methods.
void rtems_cache_invalidate_entire_instruction(void)
%
ISR_Vector_number rtems_vector_number
%
static long unsigned _SMP_Inter_processor_interrupt_handler(Per_CPU_Control *cpu_self)
Interrupts handler for inter-processor interrupts.
SuperCore SMP Implementation.
int printk(const char *fmt,...) RTEMS_PRINTFLIKE(1
Kernel Print.