Changeset 6c5c2f3 in rtems


Ignore:
Timestamp:
May 12, 2014, 7:23:51 AM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
fa0a9a18
Parents:
64a04ac
Message:

bsps: Use bsp_start_on_secondary_processor()

Use a standard function for startup on secondary processors.

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/qoriq/include/bsp.h

    r64a04ac r6c5c2f3  
    6060#define RTEMS_BSP_NETWORK_DRIVER_NAME4 "intercom1"
    6161
    62 void qoriq_secondary_cpu_initialize(void);
    63 
    6462#ifdef __cplusplus
    6563}
  • c/src/lib/libbsp/powerpc/qoriq/start/start.S

    r64a04ac r6c5c2f3  
    209209        LA      r13, _SDA_BASE_
    210210
    211         b       qoriq_secondary_cpu_initialize
     211        b       bsp_start_on_secondary_processor
    212212
    213213        b       twiddle
  • c/src/lib/libbsp/powerpc/qoriq/startup/bspsmp.c

    r64a04ac r6c5c2f3  
    2323#include <bsp/qoriq.h>
    2424#include <bsp/vectors.h>
     25#include <bsp/bootcard.h>
    2526#include <bsp/irq-generic.h>
    2627#include <bsp/linker-symbols.h>
     
    108109}
    109110
    110 void qoriq_secondary_cpu_initialize(void)
     111void bsp_start_on_secondary_processor(void)
    111112{
    112113  const Per_CPU_Control *second_cpu = _Per_CPU_Get_by_index(1);
  • c/src/lib/libbsp/sparc/leon3/include/leon.h

    r64a04ac r6c5c2f3  
    328328int apbuart_inbyte_nonblocking(struct apbuart_regs *regs);
    329329
    330 /**
    331  * @brief Initializes a secondary processor.
    332  *
    333  * @param[in] cpu The processor executing this function.
    334  */
    335 void leon3_secondary_cpu_initialize(uint32_t cpu);
    336 
    337330void leon3_cpu_counter_initialize(void);
    338331
  • c/src/lib/libbsp/sparc/leon3/startup/bspsmp.c

    r64a04ac r6c5c2f3  
    1515
    1616#include <bsp.h>
     17#include <bsp/bootcard.h>
    1718#include <leon.h>
    1819#include <rtems/bspIo.h>
     
    3435}
    3536
    36 void leon3_secondary_cpu_initialize(uint32_t cpu_index)
     37void bsp_start_on_secondary_processor()
    3738{
     39  uint32_t cpu_index_self = _CPU_SMP_Get_current_processor();
     40
    3841  leon3_set_cache_control_register(0x80000F);
    3942  /* Unmask IPI interrupts at Interrupt controller for this CPU */
    40   LEON3_IrqCtrl_Regs->mask[cpu_index] |= 1U << LEON3_MP_IRQ;
     43  LEON3_IrqCtrl_Regs->mask[cpu_index_self] |= 1U << LEON3_MP_IRQ;
    4144
    4245  _SMP_Start_multitasking_on_secondary_processor();
  • c/src/lib/libbsp/sparc/shared/start/start.S

    r64a04ac r6c5c2f3  
    242242        mov     %sp, %fp                ! set frame pointer
    243243
    244         call    SYM(leon3_secondary_cpu_initialize) ! does not return
     244        call    SYM(bsp_start_on_secondary_processor) ! does not return
    245245         sub    %sp, CPU_MINIMUM_STACK_FRAME_SIZE, %sp
    246246        ba      SYM(bsp_reset)          ! just in case
  • testsuites/smptests/smpfatal08/init.c

    r64a04ac r6c5c2f3  
    2121#include <rtems/score/smpimpl.h>
    2222
     23#include <bsp/bootcard.h>
     24
    2325#include <assert.h>
    2426#include <stdlib.h>
     
    3133 */
    3234
    33 #if defined(__PPC__)
    34 void qoriq_secondary_cpu_initialize(void)
     35void bsp_start_on_secondary_processor(void)
    3536{
    3637  /* Provided to avoid multiple definitions of the CPU SMP support functions */
    3738}
    38 #endif
    39 
    40 #if defined(__sparc__)
    41 void leon3_secondary_cpu_initialize(uint32_t cpu_index)
    42 {
    43   (void) cpu_index;
    44 
    45   /* Provided to avoid multiple definitions of the CPU SMP support functions */
    46 }
    47 #endif
    4839
    4940uint32_t _CPU_SMP_Initialize(void)
Note: See TracChangeset for help on using the changeset viewer.