Changeset 3820ff24 in rtems


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

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

  • bootcard.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.
Location:
c/src/lib/libbsp/shared
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/shared/ChangeLog

    r6ea100c1 r3820ff24  
     12008-05-12      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * bootcard.c: Refactored and renamed initialization routines to
     4        rtems_initialize_data_structures, rtems_initialize_before_drivers,
     5        rtems_initialize_device_drivers, and
     6        rtems_initialize_start_multitasking. This opened the sequence up so
     7        that bootcard() could provide a more robust and flexible framework
     8        which is easier to explain and understand. This also lays the
     9        groundwork for sharing the division of available memory between the
     10        RTEMS workspace and heap and the C library initialization across all
     11        BSPs.
     12
    1132008-05-06      Joel Sherrill <joel.sherrill@OARcorp.com>
    214
  • c/src/lib/libbsp/shared/bootcard.c

    r6ea100c1 r3820ff24  
    88 *    + boot_card
    99 *      + bspstart.c: bsp_start - more advanced initialization
    10  *      + rtems_initialize_executive_early
     10 *      + rtems_initialize_data_structures
     11 *      + bsp_pretasking_hook
     12 *      + rtems_initialize_before_drivers
     13 *      + bsp_predriver_hook
     14 *      + rtems_initialize_device_drivers
    1115 *        + all device drivers
    12  *      + rtems_initialize_executive_late
     16 *      + bsp_postdriver_hook
     17 *      + rtems_initialize_start_multitasking
    1318 *        + 1st task executes C++ global constructors
    14  *        .... appplication runs ...
    15  *        + exit
     19 *          .... appplication runs ...
     20 *          + exit
    1621 *     + back to here eventually
    1722 *     + bspclean.c: bsp_cleanup
     
    3641extern void bsp_start( void );
    3742extern void bsp_cleanup( void );
     43extern void bsp_pretasking_hook(void);
     44extern void bsp_predriver_hook(void);
     45extern void bsp_postdriver_hook(void);
    3846
    3947/*
     
    5866   *  Make sure interrupts are disabled.
    5967   */
    60 
    6168  rtems_interrupt_disable( bsp_isr_level );
    6269
     
    6774   *  a real main() in user land. :)
    6875   */
    69 
    70   if ( argv )
    71     argv_p = argv;
    72 
    73   if ( envp )
    74     envp_p = envp;
     76  if ( argv ) argv_p = argv;
     77  if ( envp ) envp_p = envp;
    7578
    7679  /*
    7780   *  Set the program name in case some application cares.
    7881   */
    79 
    8082  if ((argc > 0) && argv && argv[0])
    8183    rtems_progname = argv[0];
     
    8688   * Invoke Board Support Package initialization routine written in C.
    8789   */
    88 
    8990  bsp_start();
    9091
    9192  /*
    92    *  Initialize RTEMS but do NOT start multitasking.
     93   *  Initialize RTEMS data structures
    9394   */
     95  rtems_initialize_data_structures( &Configuration );
    9496
    95   rtems_initialize_executive_early( &Configuration );
     97  /*
     98   *  All BSP to do any required initialization now that RTEMS
     99   *  data structures are initialized.  This is the typical
     100   *  time when the C Library is initialized so malloc()
     101   *  can be called by device drivers.
     102   */
     103  bsp_pretasking_hook();
     104
     105  /*
     106   *  Let RTEMS perform initialization it requires before drivers
     107   *  are allowed to be initialized.
     108   */
     109  rtems_initialize_before_drivers();
     110
     111  /*
     112   *  Execute BSP specific pre-driver hook. Drivers haven't gotten
     113   *  to initialize yet so this is a good chance to initialize
     114   *  buses, spurious interrupt handlers, etc..
     115   *
     116   *  NOTE: Many BSPs do not require this handler and use the
     117   *        shared stub.
     118   */
     119  bsp_predriver_hook();
     120
     121  /*
     122   *  Initialize all device drivers.
     123   */
     124  rtems_initialize_device_drivers();
     125
     126  /*
     127   *  Invoke the postdriver hook.  This normally opens /dev/console
     128   *  for use as stdin, stdout, and stderr.
     129   */
     130  bsp_postdriver_hook();
    96131
    97132  /*
     
    99134   *  Global C++ constructors will be executed in the context of that task.
    100135   */
    101 
    102   rtems_initialize_executive_late( bsp_isr_level );
     136  rtems_initialize_start_multitasking();
    103137
    104138  /***************************************************************
     
    112146   *  Perform any BSP specific shutdown actions which are written in C.
    113147   */
    114 
    115148  bsp_cleanup();
    116149
Note: See TracChangeset for help on using the changeset viewer.