Changeset 2549b4d in rtems


Ignore:
Timestamp:
Apr 28, 2009, 6:34:38 AM (10 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, master
Children:
68e27077
Parents:
820d1ab0
Message:

2009-04-28 Chris Johns <chrisj@…>

  • bootcard.c, include/bootcard.h: Remove argc/argv/envp and replace with a single BSP boot command line a BSP can optionally support.
Location:
c/src/lib/libbsp/shared
Files:
1 added
3 edited

Legend:

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

    r820d1ab0 r2549b4d  
     12009-04-28      Chris Johns <chrisj@rtems.org>
     2
     3        * bootcard.c, include/bootcard.h: Remove argc/argv/envp and
     4        replace with a single BSP boot command line a BSP can optionally
     5        support.
     6
    172009-03-10      Eric Norum <norume@aps.anl.gov>
    28
  • c/src/lib/libbsp/shared/bootcard.c

    r820d1ab0 r2549b4d  
    4949
    5050/*
    51  *  Since there is a forward reference
    52  */
    53 char *rtems_progname;
     51 *  At most a single pointer to the cmdline for those target
     52 *  short on memory and not supporting a command line.
     53 */
     54const char *bsp_boot_cmdline;
    5455
    5556/*
     
    115116 */
    116117int boot_card(
    117   int    argc,
    118   char **argv,
    119   char **envp
     118  const char *cmdline
    120119)
    121120{
    122   static char            *argv_pointer = NULL;
    123   static char            *envp_pointer = NULL;
    124   char                  **argv_p = &argv_pointer;
    125   char                  **envp_p = &envp_pointer;
    126   rtems_interrupt_level   bsp_isr_level;
    127   rtems_status_code       sc = RTEMS_SUCCESSFUL;
    128   void                   *work_area_start = NULL;
    129   intptr_t                work_area_size = 0;
    130   void                   *heap_start = NULL;
    131   intptr_t                heap_size = 0;
     121  rtems_interrupt_level  bsp_isr_level;
     122  rtems_status_code      sc = RTEMS_SUCCESSFUL;
     123  void                  *work_area_start = NULL;
     124  intptr_t               work_area_size = 0;
     125  void                  *heap_start = NULL;
     126  intptr_t               heap_size = 0;
    132127
    133128  /*
     
    144139  rtems_interrupt_disable( bsp_isr_level );
    145140
    146   /*
    147    *  Set things up so we have real pointers for argv and envp.
    148    *  If the BSP has passed us something useful, then pass it on.
    149    *  Somehow we need to eventually make this available to
    150    *  a real main() in user land. :)
    151    */
    152   if ( argv ) argv_p = argv;
    153   if ( envp ) envp_p = envp;
    154 
    155   /*
    156    *  Set the program name in case some application cares.
    157    */
    158   if ((argc > 0) && argv && argv[0])
    159     rtems_progname = argv[0];
    160   else
    161     rtems_progname = "RTEMS";
     141  bsp_boot_cmdline = cmdline;
    162142
    163143  /*
     
    170150   *  the RTEMS Workspace and the C Program Heap is.
    171151   */
    172   bsp_get_work_area(&work_area_start, &work_area_size, &heap_start, &heap_size);
     152  bsp_get_work_area(&work_area_start, (ssize_t*) &work_area_size,
     153                    &heap_start, (ssize_t*) &heap_size);
    173154
    174155  if ( work_area_size <= Configuration.work_space_size ) {
  • c/src/lib/libbsp/shared/include/bootcard.h

    r820d1ab0 r2549b4d  
    6161);
    6262
    63 int boot_card( int argc, char **argv, char **envp);
     63int boot_card( const char *cmdline );
    6464
    6565void bsp_libc_init( void *heap_start, size_t heap_size, size_t sbrk_amount);
Note: See TracChangeset for help on using the changeset viewer.