uint32_t _CPU_SMP_Initialize(void) { uint32_t cpu_count = 1; if (rtems_configuration_get_maximum_processors() > 0) { cpu_count = discover_processors(); } start_thread_if_necessary(0); return cpu_count; }
uint32_t _CPU_SMP_Initialize(void) { if (rtems_configuration_get_maximum_processors() > 0) { qoriq_mmu_context mmu_context; qoriq_mmu_context_init(&mmu_context); qoriq_mmu_add( &mmu_context, BOOT_BEGIN, BOOT_LAST, 0, 0, FSL_EIS_MAS3_SR | FSL_EIS_MAS3_SW, 0 ); qoriq_mmu_partition(&mmu_context, TLB_COUNT); qoriq_mmu_write_to_tlb1(&mmu_context, TLB_BEGIN); } start_thread_if_necessary(0); return QORIQ_CPU_COUNT; }
void bsp_start_on_secondary_processor(void) { uint32_t cpu_index_self = _SMP_Get_current_processor(); const Per_CPU_Control *cpu_self = _Per_CPU_Get_by_index(cpu_index_self); ppc_exc_initialize_with_vector_base( (uintptr_t) cpu_self->interrupt_stack_low, rtems_configuration_get_interrupt_stack_size(), bsp_exc_vector_base ); /* Now it is possible to make the code execute only */ qoriq_mmu_change_perm( FSL_EIS_MAS3_SR | FSL_EIS_MAS3_SX, FSL_EIS_MAS3_SX, FSL_EIS_MAS3_SR ); bsp_interrupt_facility_initialize(); start_thread_if_necessary(cpu_index_self); _SMP_Start_multitasking_on_secondary_processor(); }