Changeset d86ae06 in rtems for cpukit/sapi/src/exinit.c


Ignore:
Timestamp:
May 12, 2008, 6:40:59 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
a169cf0
Parents:
c14e845b
Message:

2008-05-12 Joel Sherrill <joel.sherrill@…>

  • sapi/include/rtems/init.h, sapi/src/exinit.c: Refactored and renamed initialization routines to rtems_initialize_data_structures, rtems_initialize_before_drivers, rtems_initialize_device_drivers, and rtems_initialize_start_multitasking. This opened the sequence up so that bootcard() could provide a more robust and flexible framework which is easier to explain and understand. This also lays the groundwork for sharing the division of available memory between the RTEMS workspace and heap and the C library initialization across all BSPs.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/src/exinit.c

    rc14e845b rd86ae06  
    22 *  Initialization Manager
    33 *
    4  *  COPYRIGHT (c) 1989-2007.
     4 *  COPYRIGHT (c) 1989-2008.
    55 *  On-Line Applications Research Corporation (OAR).
    66 *
     
    6262Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ];
    6363
    64 rtems_interrupt_level rtems_initialize_executive_early(
     64void rtems_initialize_data_structures(
    6565  rtems_configuration_table *configuration_table
    6666)
     
    214214   *  Scheduling can properly occur now as long as we avoid dispatching.
    215215   */
    216 
    217   {
    218     extern void bsp_pretasking_hook(void);
    219     bsp_pretasking_hook();
    220   }
     216}
     217
     218void rtems_initialize_before_drivers(void)
     219{
    221220
    222221#if defined(RTEMS_MULTIPROCESSING)
     
    230229  _API_extensions_Run_predriver();
    231230
    232   {
    233     extern void bsp_predriver_hook(void);
    234     bsp_predriver_hook();
    235   }
    236 
     231}
     232
     233void rtems_initialize_device_drivers(void)
     234{
    237235  /*
    238236   *  Initialize all the device drivers and initialize the MPCI layer.
     
    259257
    260258  _API_extensions_Run_postdriver();
    261 
    262   {
    263     extern void bsp_postdriver_hook(void);
    264     bsp_postdriver_hook();
    265   }
    266 
    267   return bsp_level;
    268 }
    269 
    270 void rtems_initialize_executive_late(
    271   rtems_interrupt_level bsp_level
    272 )
     259}
     260
     261void rtems_initialize_start_multitasking(void)
    273262{
    274263
     
    277266  _Thread_Start_multitasking();
    278267
    279   /*
    280    *  Restore the interrupt level to what the BSP had.  Technically,
    281    *  this is unnecessary since the BSP should have all interrupts
    282    *  disabled when rtems_initialize_executive is invoked.  But this keeps
    283    *  the ISR Disable/Enable calls paired.
    284    */
    285 
    286   _ISR_Enable( bsp_level );
    287 }
     268  /*******************************************************************
     269   *******************************************************************
     270   *******************************************************************
     271   ******                 APPLICATION RUNS HERE                 ******
     272   ******            RETURNS WHEN SYSTEM IS SHUT DOWN           ******
     273   *******************************************************************
     274   *******************************************************************
     275   *******************************************************************/
     276}
Note: See TracChangeset for help on using the changeset viewer.