Exemplo n.º 1
0
static void start_thread_if_necessary(uint32_t cpu_index_self)
{
#if QORIQ_THREAD_COUNT > 1
  uint32_t i;

  for (i = 1; i < QORIQ_THREAD_COUNT; ++i) {
    uint32_t cpu_index_next = cpu_index_self + i;

    if (
      is_started_by_u_boot(cpu_index_self)
        && cpu_index_next < rtems_configuration_get_maximum_processors()
        && _SMP_Should_start_processor(cpu_index_next)
    ) {
      /* Thread Initial Next Instruction Address (INIA) */
      PPC_SET_THREAD_MGMT_REGISTER(321, (uint32_t) _start_thread);

      /* Thread Initial Machine State (IMSR) */
      PPC_SET_THREAD_MGMT_REGISTER(289, QORIQ_INITIAL_MSR);

      /* Thread Enable Set (TENS) */
      PPC_SET_SPECIAL_PURPOSE_REGISTER(438, 1U << i);
    }
  }
#endif
}
Exemplo n.º 2
0
Arquivo: bspsmp.c Projeto: AoLaD/rtems
bool _CPU_SMP_Start_processor(uint32_t cpu_index)
{
#if QORIQ_THREAD_COUNT > 1
  if (is_started_by_u_boot(cpu_index)) {
    qoriq_start_spin_table *spin_table = get_spin_table(cpu_index);

    return release_processor(spin_table, cpu_index);
  } else {
    return _SMP_Should_start_processor(cpu_index - 1);
  }
#else
  qoriq_start_spin_table *spin_table = get_spin_table(cpu_index);

  return release_processor(spin_table, cpu_index);
#endif
}
Exemplo n.º 3
0
bool _CPU_SMP_Start_processor(uint32_t cpu_index)
{
#if QORIQ_THREAD_COUNT > 1
  if (is_started_by_u_boot(cpu_index)) {
    uboot_spin_table *spin_table =
      &((uboot_spin_table *) SPIN_TABLE)[cpu_index / 2 - 1];

    release_processor(spin_table, cpu_index);

    return true;
  } else {
    return _SMP_Should_start_processor(cpu_index - 1);
  }
#else
  uboot_spin_table *spin_table = (uboot_spin_table *) SPIN_TABLE;

  release_processor(spin_table, cpu_index);

  return true;
#endif
}