bsp/qoriq: 64-bit support for spin table

Update #3082.
This commit is contained in:
Sebastian Huber
2017-08-01 08:42:45 +02:00
parent 0ae1916bcf
commit f14da4517f
2 changed files with 6 additions and 10 deletions

View File

@@ -88,14 +88,11 @@ void *bsp_idle_thread( uintptr_t ignored );
/* Internal data and functions */ /* Internal data and functions */
typedef struct { typedef struct {
uint32_t addr_upper; uint64_t addr;
uint32_t addr_lower; uint64_t r3;
uint32_t r3_upper;
uint32_t r3_lower;
uint32_t reserved_0; uint32_t reserved_0;
uint32_t pir; uint32_t pir;
uint32_t r6_upper; uint64_t r6;
uint32_t r6_lower;
uint32_t reserved_1[8]; uint32_t reserved_1[8];
} qoriq_start_spin_table; } qoriq_start_spin_table;

View File

@@ -79,7 +79,7 @@ static void start_thread_if_necessary(uint32_t cpu_index_self)
&& _SMP_Should_start_processor(cpu_index_next) && _SMP_Should_start_processor(cpu_index_next)
) { ) {
/* Thread Initial Next Instruction Address (INIA) */ /* Thread Initial Next Instruction Address (INIA) */
PPC_SET_THREAD_MGMT_REGISTER(321, (uint32_t) _start_thread); PPC_SET_THREAD_MGMT_REGISTER(321, (uintptr_t) _start_thread);
/* Thread Initial Machine State (IMSR) */ /* Thread Initial Machine State (IMSR) */
PPC_SET_THREAD_MGMT_REGISTER(289, QORIQ_INITIAL_MSR); PPC_SET_THREAD_MGMT_REGISTER(289, QORIQ_INITIAL_MSR);
@@ -158,11 +158,10 @@ static bool release_processor(
const Per_CPU_Control *cpu = _Per_CPU_Get_by_index(cpu_index); const Per_CPU_Control *cpu = _Per_CPU_Get_by_index(cpu_index);
spin_table->pir = cpu_index; spin_table->pir = cpu_index;
spin_table->r3_lower = (uint32_t) cpu->interrupt_stack_high; spin_table->r3 = (uintptr_t) cpu->interrupt_stack_high;
spin_table->addr_upper = 0;
rtems_cache_flush_multiple_data_lines(spin_table, sizeof(*spin_table)); rtems_cache_flush_multiple_data_lines(spin_table, sizeof(*spin_table));
ppc_synchronize_data(); ppc_synchronize_data();
spin_table->addr_lower = (uint32_t) _start_secondary_processor; spin_table->addr = (uintptr_t) _start_secondary_processor;
rtems_cache_flush_multiple_data_lines(spin_table, sizeof(*spin_table)); rtems_cache_flush_multiple_data_lines(spin_table, sizeof(*spin_table));
} }