diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-05-12 18:40:59 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-05-12 18:40:59 +0000 |
commit | d86ae064a0774d877311e5a1ed0eda1fd72d0575 (patch) | |
tree | d5962696f37e8a486ea454bf54f5033b15a6d209 /cpukit/sapi/src/exinit.c | |
parent | 2008-05-10 Till Straumann <strauman@slac.stanford.edu> (diff) | |
download | rtems-d86ae064a0774d877311e5a1ed0eda1fd72d0575.tar.bz2 |
2008-05-12 Joel Sherrill <joel.sherrill@OARcorp.com>
* 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.
Diffstat (limited to 'cpukit/sapi/src/exinit.c')
-rw-r--r-- | cpukit/sapi/src/exinit.c | 45 |
1 files changed, 17 insertions, 28 deletions
diff --git a/cpukit/sapi/src/exinit.c b/cpukit/sapi/src/exinit.c index 45390c9a2d..1b41ed2bb4 100644 --- a/cpukit/sapi/src/exinit.c +++ b/cpukit/sapi/src/exinit.c @@ -1,7 +1,7 @@ /* * Initialization Manager * - * COPYRIGHT (c) 1989-2007. + * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -61,7 +61,7 @@ Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ]; -rtems_interrupt_level rtems_initialize_executive_early( +void rtems_initialize_data_structures( rtems_configuration_table *configuration_table ) { @@ -213,11 +213,10 @@ rtems_interrupt_level rtems_initialize_executive_early( /* * Scheduling can properly occur now as long as we avoid dispatching. */ +} - { - extern void bsp_pretasking_hook(void); - bsp_pretasking_hook(); - } +void rtems_initialize_before_drivers(void) +{ #if defined(RTEMS_MULTIPROCESSING) _MPCI_Create_server(); @@ -229,11 +228,10 @@ rtems_interrupt_level rtems_initialize_executive_early( _API_extensions_Run_predriver(); - { - extern void bsp_predriver_hook(void); - bsp_predriver_hook(); - } +} +void rtems_initialize_device_drivers(void) +{ /* * Initialize all the device drivers and initialize the MPCI layer. * @@ -258,30 +256,21 @@ rtems_interrupt_level rtems_initialize_executive_early( */ _API_extensions_Run_postdriver(); - - { - extern void bsp_postdriver_hook(void); - bsp_postdriver_hook(); - } - - return bsp_level; } -void rtems_initialize_executive_late( - rtems_interrupt_level bsp_level -) +void rtems_initialize_start_multitasking(void) { _System_state_Set( SYSTEM_STATE_BEGIN_MULTITASKING ); _Thread_Start_multitasking(); - /* - * Restore the interrupt level to what the BSP had. Technically, - * this is unnecessary since the BSP should have all interrupts - * disabled when rtems_initialize_executive is invoked. But this keeps - * the ISR Disable/Enable calls paired. - */ - - _ISR_Enable( bsp_level ); + /******************************************************************* + ******************************************************************* + ******************************************************************* + ****** APPLICATION RUNS HERE ****** + ****** RETURNS WHEN SYSTEM IS SHUT DOWN ****** + ******************************************************************* + ******************************************************************* + *******************************************************************/ } |