Changeset 54d87f2 in rtems


Ignore:
Timestamp:
09/04/18 16:28:57 (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
2f61eb21
Parents:
9a21fc7
git-author:
Sebastian Huber <sebastian.huber@…> (09/04/18 16:28:57)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/06/18 05:04:28)
Message:

bsps/powerpc: Simplify ppc_exc_initialize()

Remove parameters from ppc_exc_initialize() since all BSPs passed the
same values.

Update #3459.

Location:
bsps/powerpc
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • bsps/powerpc/beatnik/start/bspstart.c

    r9a21fc7 r54d87f2  
    178178  unsigned char  *stack;
    179179  char           *chpt;
    180   uintptr_t       intrStackStart;
    181   uintptr_t       intrStackSize;
    182180
    183181  Triv121PgTbl  pt=0;
     
    232230  *((uint32_t *)stack) = 0;
    233231
    234   /*
    235    * Initialize the interrupt related settings
    236    * SPRG0 = interrupt nesting level count
    237    * SPRG1 = software managed IRQ stack
    238    *
    239    * This could be done latter (e.g in IRQ_INIT) but it helps to understand
    240    * some settings below...
    241    */
    242   intrStackStart = (uintptr_t)_Configuration_Interrupt_stack_area_begin;
    243   intrStackSize  = rtems_configuration_get_interrupt_stack_size();
    244 
    245   /*
    246    * Initialize default raw exception handlers. See vectors/vectors_init.c
    247    */
    248   ppc_exc_initialize(intrStackStart, intrStackSize);
     232  ppc_exc_initialize();
    249233
    250234  printk("CPU: %s\n", get_ppc_cpu_type_name(current_ppc_cpu));
  • bsps/powerpc/gen5200/start/bspstart.c

    r9a21fc7 r54d87f2  
    154154  /* Initialize exception handler */
    155155  ppc_exc_cache_wb_check = 0;
    156   ppc_exc_initialize(
    157     (uintptr_t) _Configuration_Interrupt_stack_area_begin,
    158     rtems_configuration_get_interrupt_stack_size()
    159   );
     156  ppc_exc_initialize();
    160157  ppc_exc_set_handler(ASM_ALIGN_VECTOR, ppc_exc_alignment_handler);
    161158
    162   /* Initalize interrupt support */
     159  /* Initialize interrupt support */
    163160  bsp_interrupt_initialize();
    164161
  • bsps/powerpc/gen83xx/start/bspstart.c

    r9a21fc7 r54d87f2  
    114114  ppc_exc_cache_wb_check = 0;
    115115#endif
    116   ppc_exc_initialize(
    117     (uintptr_t) _Configuration_Interrupt_stack_area_begin,
    118     rtems_configuration_get_interrupt_stack_size()
    119   );
     116  ppc_exc_initialize();
    120117
    121118  /* Install default handler for the decrementer exception */
  • bsps/powerpc/haleakala/start/bspstart.c

    r9a21fc7 r54d87f2  
    182182  bsp_clicks_per_usec = 400;
    183183
    184   /*
    185    * Initialize default raw exception handlers.
    186    */
    187   ppc_exc_initialize(
    188     (uintptr_t) _Configuration_Interrupt_stack_area_begin,
    189     rtems_configuration_get_interrupt_stack_size()
    190   );
     184  ppc_exc_initialize();
    191185
    192186  /*
  • bsps/powerpc/include/bsp/vectors.h

    r9a21fc7 r54d87f2  
    301301);
    302302
    303 static inline void ppc_exc_initialize_interrupt_stack(
    304   uintptr_t stack_begin,
    305   uintptr_t stack_size
    306 )
     303static inline void ppc_exc_initialize_interrupt_stack(uintptr_t stack_begin)
    307304{
     305  uintptr_t stack_size = rtems_configuration_get_interrupt_stack_size();
    308306  uintptr_t stack_end = stack_begin + stack_size;
    309307  uintptr_t stack_pointer = stack_end - PPC_MINIMUM_STACK_FRAME_SIZE;
     
    327325void ppc_exc_initialize_with_vector_base(
    328326  uintptr_t interrupt_stack_begin,
    329   uintptr_t interrupt_stack_size,
    330327  void *vector_base
    331328);
     
    344341 * - the minimal prologue creation failed.
    345342 */
    346 static inline void ppc_exc_initialize(
    347   uintptr_t interrupt_stack_begin,
    348   uintptr_t interrupt_stack_size
    349 )
     343static inline void ppc_exc_initialize(void)
    350344{
    351345  ppc_exc_initialize_with_vector_base(
    352     interrupt_stack_begin,
    353     interrupt_stack_size,
     346    (uintptr_t) _Configuration_Interrupt_stack_area_begin,
    354347    NULL
    355348  );
  • bsps/powerpc/motorola_powerpc/start/bspstart.c

    r9a21fc7 r54d87f2  
    136136  unsigned l2cr;
    137137#endif
    138   uintptr_t intrStackStart;
    139   uintptr_t intrStackSize;
    140138  prep_t boardManufacturer;
    141139  motorolaBoard myBoard;
     
    218216#endif
    219217
    220   /*
    221    * Initialize the interrupt related settings.
    222    */
    223   intrStackStart = (uintptr_t)_Configuration_Interrupt_stack_area_begin;
    224   intrStackSize = rtems_configuration_get_interrupt_stack_size();
    225 
    226   /*
    227    * Initialize default raw exception handlers.
    228    */
    229   ppc_exc_initialize(intrStackStart, intrStackSize);
     218  ppc_exc_initialize();
    230219
    231220  boardManufacturer   =  checkPrepBoardType(&residualCopy);
     
    243232  printk("Residuals are located at %x\n", (unsigned) &residualCopy);
    244233  printk("Additionnal boot options are %s\n", loaderParam);
    245   printk("Software IRQ stack starts at %x with size %u\n", intrStackStart, intrStackSize);
    246234  printk("-----------------------------------------\n");
    247235#endif
  • bsps/powerpc/mpc55xxevb/start/bspstart.c

    r9a21fc7 r54d87f2  
    8989        bsp_clicks_per_usec = bsp_clock_speed / 1000000;
    9090
    91         /* Initialize exceptions */
    9291        ppc_exc_initialize_with_vector_base(
    9392                (uintptr_t) _Configuration_Interrupt_stack_area_begin,
    94                 rtems_configuration_get_interrupt_stack_size(),
    9593                mpc55xx_exc_vector_base
    9694        );
    97 
    98         /* Initialize interrupts */
    9995        bsp_interrupt_initialize();
    10096
  • bsps/powerpc/mpc8260ads/start/bspstart.c

    r9a21fc7 r54d87f2  
    139139*/
    140140
    141   /* Initialize exception handler */
    142   ppc_exc_initialize(
    143     (uintptr_t) _Configuration_Interrupt_stack_area_begin,
    144     rtems_configuration_get_interrupt_stack_size()
    145   );
    146 
    147   /* Initalize interrupt support */
     141  ppc_exc_initialize();
    148142  bsp_interrupt_initialize();
    149143
  • bsps/powerpc/mvme3100/start/bspstart.c

    r9a21fc7 r54d87f2  
    211211{
    212212  unsigned char       *stack;
    213   uintptr_t            intrStackStart;
    214   uintptr_t            intrStackSize;
    215213  char                *chpt;
    216214  int                  i;
     
    253251  *((uint32_t*)stack) = 0;
    254252
    255   /*
    256    * Initialize the interrupt related settings.
    257    */
    258   intrStackStart = (uintptr_t) _Configuration_Interrupt_stack_area_begin;
    259   intrStackSize = rtems_configuration_get_interrupt_stack_size();
    260 
    261   /*
    262    * Initialize default raw exception handlers.
    263    */
    264   ppc_exc_initialize(intrStackStart, intrStackSize);
     253  ppc_exc_initialize();
    265254
    266255  printk("CPU 0x%x - rev 0x%x\n", myCpu, myCpuRevision);
     
    269258  printk("Additionnal boot options are %s\n", BSP_commandline_string);
    270259  printk("Initial system stack at %" PRIxPTR "\n", (uintptr_t) stack);
    271   printk("Software IRQ stack starts at %x with size %u\n", intrStackStart, intrStackSize);
    272260#endif
    273261
  • bsps/powerpc/mvme5500/start/bspstart.c

    r9a21fc7 r54d87f2  
    189189  unsigned l3cr;
    190190#endif
    191   uintptr_t intrStackStart;
    192   uintptr_t intrStackSize;
    193191  Triv121PgTbl  pt=0;
    194192
     
    223221#endif
    224222
    225   /*
    226    * Initialize the interrupt related settings.
    227    */
    228   intrStackStart = (uintptr_t) _Configuration_Interrupt_stack_area_begin;
    229   intrStackSize = rtems_configuration_get_interrupt_stack_size();
    230 
    231   /*
    232    * Initialize default raw exception handlers.
    233    */
    234   ppc_exc_initialize(intrStackStart, intrStackSize);
     223  ppc_exc_initialize();
    235224
    236225  /*
  • bsps/powerpc/psim/start/bspstart.c

    r9a21fc7 r54d87f2  
    8888  BSP_time_base_divisor    = 1;
    8989
    90   /*
    91    * Initialize default raw exception handlers.
    92    */
    9390  ppc_exc_initialize_with_vector_base(
    9491    (uintptr_t) _Configuration_Interrupt_stack_area_begin,
    95     rtems_configuration_get_interrupt_stack_size(),
    9692    (void *) 0xfff00000
    9793  );
  • bsps/powerpc/qemuppc/start/bspstart.c

    r9a21fc7 r54d87f2  
    6767{
    6868  rtems_status_code sc = RTEMS_SUCCESSFUL;
    69   uintptr_t intrStackStart;
    70   uintptr_t intrStackSize;
    7169
    7270  /*
     
    8583  bsp_clicks_per_usec      = BSP_bus_frequency;
    8684
    87   /*
    88    * Initialize the interrupt related settings.
    89    */
    90   intrStackStart = (uintptr_t) _Configuration_Interrupt_stack_area_begin;
    91   intrStackSize = rtems_configuration_get_interrupt_stack_size();
    92 
    9385  BSP_mem_size = (uint32_t )RamSize;
    9486
    95   /*
    96    * Initialize default raw exception handlers.
    97    */
    98   ppc_exc_initialize(intrStackStart, intrStackSize);
     87  ppc_exc_initialize();
    9988
    10089  /* Install default handler for the decrementer exception */
  • bsps/powerpc/qoriq/start/bspsmp.c

    r9a21fc7 r54d87f2  
    4848{
    4949  ppc_exc_initialize_interrupt_stack(
    50     (uintptr_t) cpu_self->interrupt_stack_low,
    51     rtems_configuration_get_interrupt_stack_size()
     50    (uintptr_t) cpu_self->interrupt_stack_low
    5251  );
    5352
  • bsps/powerpc/qoriq/start/bspstart.c

    r9a21fc7 r54d87f2  
    114114
    115115  ppc_exc_initialize_interrupt_stack(
    116     (uintptr_t) interrupt_stack_begin,
    117     rtems_configuration_get_interrupt_stack_size()
     116    (uintptr_t) interrupt_stack_begin
    118117  );
    119118
  • bsps/powerpc/shared/exceptions/ppc_exc_initialize.c

    r9a21fc7 r54d87f2  
    8383void ppc_exc_initialize_with_vector_base(
    8484  uintptr_t interrupt_stack_begin,
    85   uintptr_t interrupt_stack_size,
    8685  void *vector_base
    8786)
     
    111110  }
    112111
    113   ppc_exc_initialize_interrupt_stack(interrupt_stack_begin, interrupt_stack_size);
     112  ppc_exc_initialize_interrupt_stack(interrupt_stack_begin);
    114113
    115114#ifndef PPC_EXC_CONFIG_BOOKE_ONLY
  • bsps/powerpc/shared/start/bspgetworkarea.c

    r9a21fc7 r54d87f2  
    2727  uintptr_t work_area;
    2828
    29   work_area = (uintptr_t)__rtems_end +
    30               rtems_configuration_get_interrupt_stack_size();
     29  work_area = (uintptr_t)__rtems_end;
    3130  work_size = (uintptr_t)BSP_mem_size - work_area;
    3231
  • bsps/powerpc/t32mppc/start/bspstart.c

    r9a21fc7 r54d87f2  
    5050
    5151  ppc_exc_initialize_interrupt_stack(
    52     (uintptr_t) _Configuration_Interrupt_stack_area_begin,
    53     rtems_configuration_get_interrupt_stack_size()
     52    (uintptr_t) _Configuration_Interrupt_stack_area_begin
    5453  );
    5554
  • bsps/powerpc/tqm8xx/start/bspstart.c

    r9a21fc7 r54d87f2  
    144144  bsp_clicks_per_usec = bsp_time_base_frequency / 1000000;
    145145
    146   /* Initialize exception handler */
    147   ppc_exc_initialize(
    148     (uintptr_t) _Configuration_Interrupt_stack_area_begin,
    149     rtems_configuration_get_interrupt_stack_size()
    150   );
    151 
    152   /* Initalize interrupt support */
     146  ppc_exc_initialize();
    153147  bsp_interrupt_initialize();
    154148
  • bsps/powerpc/virtex/start/bspstart.c

    r9a21fc7 r54d87f2  
    9595  get_ppc_cpu_revision();
    9696
    97   /*
    98    * Initialize default raw exception handlers.
    99    */
    10097  ppc_exc_initialize_with_vector_base(
    10198    (uintptr_t) _Configuration_Interrupt_stack_area_begin,
    102     rtems_configuration_get_interrupt_stack_size(),
    10399    virtex_exc_vector_base
    104100  );
  • bsps/powerpc/virtex4/start/bspstart.c

    r9a21fc7 r54d87f2  
    142142void bsp_start(void)
    143143{
    144   uintptr_t          intrStackStart;
    145   uintptr_t          intrStackSize;
    146 
    147144  ppc_cpu_id_t       myCpu;
    148145  ppc_cpu_revision_t myCpuRevision;
     
    169166  bsp_clicks_per_usec        = 350;
    170167
    171   /*
    172    * Initialize the interrupt related settings.
    173    */
    174   intrStackStart = (uintptr_t) _Configuration_Interrupt_stack_area_begin;
    175   intrStackSize  = rtems_configuration_get_interrupt_stack_size();
    176 
    177   ppc_exc_initialize(intrStackStart, intrStackSize);
     168  ppc_exc_initialize();
    178169
    179170  /* Let the user know what parameters we were compiled with */
     
    181172         "RAM:              %p                    %p\n"
    182173         "RTEMS:                           %p\n"
    183          "Interrupt Stack:  0x%08x              0x%x\n"
    184174         "Workspace:        %p             %p\n"
    185175         "MsgArea:          %p             %p\n"
     
    187177         RamBase,        RamSize,
    188178         __rtems_end,
    189          intrStackStart,                intrStackSize,
    190179         WorkAreaBase,   __bsp_ram_end,
    191180         MsgAreaBase,    MsgAreaSize,
  • bsps/powerpc/virtex5/start/bspstart.c

    r9a21fc7 r54d87f2  
    156156void bsp_start(void)
    157157{
    158   uintptr_t          intrStackStart;
    159   uintptr_t          intrStackSize;
    160 
    161158  ppc_cpu_id_t       myCpu;
    162159  ppc_cpu_revision_t myCpuRevision;
     
    188185  bsp_clicks_per_usec        = BSP_bus_frequency/(BSP_time_base_divisor * 1000);
    189186
    190   /*
    191    * Initialize the interrupt related settings.
    192    */
    193   intrStackStart = (uintptr_t)_Configuration_Interrupt_stack_area_begin;
    194   intrStackSize  = rtems_configuration_get_interrupt_stack_size();
    195 
    196   ppc_exc_initialize(intrStackStart, intrStackSize);
     187  ppc_exc_initialize();
    197188
    198189  /* Let the user know what parameters we were compiled with */
     
    200191         "RAM:              %p                    %p\n"
    201192         "RTEMS:                           %p\n"
    202          "Interrupt Stack:  0x%08x              0x%x\n"
    203193         "Workspace:        %p             %p\n"
    204194         "MsgArea:          %p             %p\n"
     
    206196         RamBase,        RamSize,
    207197         __rtems_end,
    208          intrStackStart,                intrStackSize,
    209198         WorkAreaBase,   __bsp_ram_end,
    210199         MsgAreaBase,    MsgAreaSize,
Note: See TracChangeset for help on using the changeset viewer.