Changeset e2a2ec60 in rtems


Ignore:
Timestamp:
Mar 21, 1998, 3:37:18 PM (23 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
77bf1b1
Parents:
2b4aec8
Message:

Switch to using a shared main() for all of the embedded BSPs
based on the GNU tools. This usually involved correcting the
type of bsp_start(), bsp_cleanup(), adjusting the start code to
call the right start routine (the shared boot_card()), and then
removing code from bsp_start() which was performed in the new
boot_card()/main() path.

Location:
c/src/lib
Files:
3 added
67 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h

    r2b4aec8 re2a2ec60  
    110110extern rtems_cpu_table           Cpu_table;             /* owned by BSP */
    111111
    112 extern rtems_unsigned32          bsp_isr_level;
    113 
    114112extern int cpu_number;         /* from 0; cpu number in a multi cpu system */
    115113
  • c/src/lib/libbsp/hppa1.1/simhppa/start/start.s

    r2b4aec8 re2a2ec60  
    2121 * stuff we need that is defined elsewhere.
    2222 */
    23         .IMPORT main, CODE
     23        .IMPORT boot_card, CODE
    2424        .IMPORT _bss_start, DATA
    2525        .IMPORT _bss_end, DATA
     
    7676
    7777/*
    78  * Call the "main" routine from the application to get it going.
    79  * We call it as main(1, argv, 0)
     78 * Call the "boot_card" routine from the application to get it going.
     79 * We call it as boot_card(1, argv, 0)
    8080 */
    8181
     
    8585        ldo     R%_crt0_argv(%r25),%r25
    8686
    87         bl      main,%r2
     87        bl      boot_card,%r2
    8888        ldo     1(%r0), %r26
    8989
  • c/src/lib/libbsp/hppa1.1/simhppa/startup/Makefile.in

    r2b4aec8 re2a2ec60  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bspstart sbrk setvec
     14C_PIECES=bspclean bspstart main sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
    17 
    18 CC_PIECES=rtems-ctor
    19 CC_FILES=$(CC_PIECES:%=%.cc)
    20 CC_O_FILES=$(CC_PIECES:%=${ARCH}/%.o)
    2117
    2218H_FILES=
     
    2420SRCS=$(C_FILES) $(H_FILES)
    2521OBJS=$(C_O_FILES)
    26 
    27 # We install the RTEMS constructor as a separate .o
    28 # so it can be easily place correctly by the compiler config file.
    29 INSTALLED_O_FILES=$(ARCH)/rtems-ctor.o
    3022
    3123include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
     
    5749        $(make-rel)
    5850
    59 all:    ${ARCH} $(SRCS) $(INSTALLED_O_FILES) $(PGM)
    60         $(INSTALL_VARIANT) $(INSTALLED_O_FILES) ${PROJECT_RELEASE}/lib
     51all:    ${ARCH} $(SRCS) $(PGM)
    6152
    6253# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
  • c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c

    r2b4aec8 re2a2ec60  
    4040rtems_configuration_table BSP_Configuration;
    4141rtems_cpu_table           Cpu_table;
    42 rtems_unsigned32          bsp_isr_level;
    4342
    4443int cpu_number;
     
    285284 */
    286285
    287 
    288 void
    289 bsp_start(void)
     286void bsp_start(void)
    290287{
    291288    /*
     
    427424    if (CPU_HPPA_CLICKS_PER_TICK == 0)
    428425        CPU_HPPA_CLICKS_PER_TICK = 0x4000;
    429 
    430     /*
    431      *  Start most of RTEMS
    432      *  main() will start the rest
    433      */
    434 
    435     bsp_isr_level = rtems_initialize_executive_early(
    436       &BSP_Configuration,
    437       &Cpu_table
    438     );
    439426}
  • c/src/lib/libbsp/i386/force386/startup/Makefile.in

    r2b4aec8 re2a2ec60  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspstart sbrk setvec
     14C_PIECES=bspclean bspstart main sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/i386/force386/startup/bspstart.c

    r2b4aec8 re2a2ec60  
    140140}
    141141
    142 int main(
    143   int argc,
    144   char **argv,
    145   char **environp
    146 )
    147 {
    148  
    149   if ((argc > 0) && argv && argv[0])
    150     rtems_progname = argv[0];
    151   else
    152     rtems_progname = "RTEMS";
     142void bsp_start( void )
     143{
    153144 
    154145  /*
     
    218209
    219210  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    220 
    221   rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
    222   /* does not return */
    223   /* no cleanup necessary for Force CPU-386 */
    224   return 0;
    225 }
     211}
  • c/src/lib/libbsp/i386/i386ex/startup/Makefile.in

    r2b4aec8 re2a2ec60  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 # C_PIECES=bspstart sbrk setvec except i386-stub
    15 C_PIECES=bspstart sbrk setvec
     14C_PIECES=bspclean bspstart main sbrk setvec
    1615C_FILES=$(C_PIECES:%=%.c)
    1716C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/i386/i386ex/startup/bspstart.c

    r2b4aec8 re2a2ec60  
    142142
    143143
    144 int main(
    145   int argc,
    146   char **argv,
    147   char **environp
    148 )
     144void bsp_start( void )
    149145{
    150146
     
    155151  outbyte ('S');
    156152#endif
    157 
    158   if ((argc > 0) && argv && argv[0])
    159     rtems_progname = argv[0];
    160   else
    161     rtems_progname = "RTEMS";
    162153
    163154  /*
     
    223214#endif
    224215
    225   rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
    226   /* does not return */
    227   /* no cleanup necessary for i386ex */
    228   for (;;);  /* was return 0 to go to the debug monitor */
    229 }
     216}
  • c/src/lib/libbsp/i386/pc386/start/start.s

    r2b4aec8 re2a2ec60  
    6767        PUBLIC (start)          # GNU default entry point
    6868
    69         EXTERN (main)
     69        EXTERN (boot_card)
    7070        EXTERN (load_segments)
    7171        EXTERN (exit)
     
    281281        pushl   $0                      # argv
    282282        pushl   $0                      # argc
    283         call    SYM (main)
     283        call    SYM (boot_card)
    284284        addl    $12, esp
    285285
  • c/src/lib/libbsp/i386/pc386/startup/Makefile.in

    r2b4aec8 re2a2ec60  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspstart exit irq sbrk
     14C_PIECES=bspclean bspstart exit irq main sbrk
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/i386/pc386/startup/bspstart.c

    r2b4aec8 re2a2ec60  
    172172
    173173/*-------------------------------------------------------------------------+
    174 |         Function: main
    175 |      Description: Called from bsp's startup code ('start.s').
     174|         Function: bsp_start
     175|      Description: Called before main is invoked.
    176176| Global Variables: None.
    177177|        Arguments: None.
    178178|          Returns: Nothing.
    179179+--------------------------------------------------------------------------*/
    180 int main(int argc, char **argv, char **environp)
     180void bsp_start( void )
    181181{
    182182  /* If we don't have command line arguments set default program name. */
    183 
    184   if ((argc > 0) && argv && argv[0])
    185     rtems_progname = argv[0];
    186   else
    187     rtems_progname = "RTEMS";
    188183
    189184  Cpu_table.pretasking_hook         = bsp_pretasking_hook; /* init libc, etc. */
     
    227222  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    228223
     224#if 0
    229225  rtems_initialize_executive(&BSP_Configuration, &Cpu_table);
    230226  /* does not return */
     
    241237
    242238  return 0;
    243 } /* main */
     239#endif
     240} /* bsp_start */
  • c/src/lib/libbsp/i960/cvme961/include/bsp.h

    r2b4aec8 re2a2ec60  
    115115extern rtems_configuration_table BSP_Configuration;
    116116
    117 BSP_EXTERN i960ca_PRCB          *Prcb;
    118 BSP_EXTERN i960ca_control_table *Ctl_tbl;
     117BSP_EXTERN i960ca_PRCB           *Prcb;
     118BSP_EXTERN i960ca_control_table  *Ctl_tbl;
    119119
    120120/*
  • c/src/lib/libbsp/i960/cvme961/startup/Makefile.in

    r2b4aec8 re2a2ec60  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bspstart sbrk setvec
     14C_PIECES=bspclean bspstart main sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/i960/cvme961/startup/bspstart.c

    r2b4aec8 re2a2ec60  
    142142}
    143143
    144 int main(
    145   int argc,
    146   char **argv,
    147   char **environp
    148 )
    149 {
    150   if ((argc > 0) && argv && argv[0])
    151     rtems_progname = argv[0];
    152   else
    153     rtems_progname = "RTEMS";
    154 
     144void bsp_start( void )
     145{
    155146  /* set node number in SQSIO4 CTL REG */
    156147
     
    235226  BSP_Configuration.work_space_start = (void *)
    236227     (RAM_END - BSP_Configuration.work_space_size);
    237 
    238   rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
    239   /* does not return */
    240 
    241   bsp_cleanup();
    242 
    243   return 0;
    244 
    245 }
     228}
  • c/src/lib/libbsp/m68k/dmv152/startup/Makefile.in

    r2b4aec8 re2a2ec60  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspstart sbrk setvec vmeintr
     14C_PIECES=bspclean bspstart main sbrk setvec vmeintr
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c

    r2b4aec8 re2a2ec60  
    140140}
    141141
    142 int main(
    143   int argc,
    144   char **argv,
    145   char **environp
    146 )
     142void bsp_start( void )
    147143{
    148144  m68k_isr_entry *monitors_vector_table;
     
    150146  void           *vbr;
    151147
    152   if ((argc > 0) && argv && argv[0])
    153     rtems_progname = argv[0];
    154   else
    155     rtems_progname = "RTEMS";
    156 
    157148  monitors_vector_table = (m68k_isr_entry *)0;   /* Monitor Vectors are at 0 */
    158149  m68k_set_vbr( monitors_vector_table );
     
    247238  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    248239
    249   rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
    250   /* does not return */
    251 
    252240  /* Clock_exit is done as an atexit() function */
    253 
    254   VME_interrupt_Disable( 0xff );
    255 
    256   /* return like a "normal" subroutine to the monitor */
    257   return 0;
    258 }
     241}
  • c/src/lib/libbsp/m68k/efi332/start/start.c

    r2b4aec8 re2a2ec60  
    1212char * const __argv[]= {"main", ""};
    1313char * const __env[]= {""};
    14 
    15 int main(const int argc, char * const argv[], char * const env[]);
    1614
    1715/*
     
    183181   * Execute main with arguments argv and environment env
    184182   */
    185   main(1, __argv, __env);
     183  /* main(1, __argv, __env); */
     184
     185  boot_card();
    186186
    187187  reboot();
  • c/src/lib/libbsp/m68k/efi332/start332/start332.c

    r2b4aec8 re2a2ec60  
    1212char * const __argv[]= {"main", ""};
    1313char * const __env[]= {""};
    14 
    15 int main(const int argc, char * const argv[], char * const env[]);
    1614
    1715/*
     
    183181   * Execute main with arguments argv and environment env
    184182   */
    185   main(1, __argv, __env);
     183  /* main(1, __argv, __env); */
     184
     185  boot_card();
    186186
    187187  reboot();
  • c/src/lib/libbsp/m68k/efi332/startup/Makefile.in

    r2b4aec8 re2a2ec60  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspstart bspclean sbrk setvec
     14C_PIECES=bspstart bspclean main sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/m68k/efi332/startup/bspstart.c

    r2b4aec8 re2a2ec60  
    148148}
    149149 
    150 int main(
    151   int argc,
    152   char **argv,
    153   char **environp
    154 )
     150void bsp_start( void )
    155151{
    156152  void           *vbr;
     
    214210  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    215211
    216   rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
    217   /* does not return */
    218 
    219212  /* Clock_exit is done as an atexit() function */
    220 
    221   /* configure peripherals for safe exit */
    222   bsp_cleanup();
    223 
    224   /* return like a "normal" subroutine to the monitor */
    225   return 0;
    226 }
    227 
     213}
     214
  • c/src/lib/libbsp/m68k/efi68k/start/start.c

    r2b4aec8 re2a2ec60  
    1111char * const __argv[]= {"main", ""};
    1212char * const __env[]= {""};
    13 
    14 int main(const int argc, char * const argv[], char * const env[]);
    1513
    1614/*
     
    6664   * Execute main with arguments argv and environment env
    6765   */
    68   main(1, __argv, __env);
     66  /* main(1, __argv, __env); */
     67  boot_card();
    6968
    7069  reboot();
  • c/src/lib/libbsp/m68k/efi68k/start68k/start68k.c

    r2b4aec8 re2a2ec60  
    1111char * const __argv[]= {"main", ""};
    1212char * const __env[]= {""};
    13 
    14 int main(const int argc, char * const argv[], char * const env[]);
    1513
    1614/*
     
    6664   * Execute main with arguments argv and environment env
    6765   */
    68   main(1, __argv, __env);
     66  /* main(1, __argv, __env); */
     67  boot_card();
    6968
    7069  reboot();
  • c/src/lib/libbsp/m68k/efi68k/startup/Makefile.in

    r2b4aec8 re2a2ec60  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspstart bspclean efi68k_tcp efi68k_wd sbrk setvec
     14C_PIECES=bspstart bspclean efi68k_tcp efi68k_wd main sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/m68k/efi68k/startup/bspstart.c

    r2b4aec8 re2a2ec60  
    153153}
    154154
    155 int main(
    156   int argc,
    157   char **argv,
    158   char **environp
    159 )
     155void bsp_start( void )
    160156{
    161157  void           *vbr;
     
    222218  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    223219
    224   rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
    225   /* does not return */
    226 
    227220  /* Clock_exit is done as an atexit() function */
    228 
    229 /* exit: */
    230   /* configure peripherals for safe exit */
    231   bsp_cleanup();
    232 
    233   /* return like a "normal" subroutine to the monitor */
    234   return 0;
    235 }
    236 
     221}
     222
  • c/src/lib/libbsp/m68k/gen68302/start/start302.s

    r2b4aec8 re2a2ec60  
    217217
    218218      /*
    219        *  RTEMS should maintiain a separate interrupt stack on CPUs
     219       *  RTEMS should maintain a separate interrupt stack on CPUs
    220220       *  without one in hardware.  This is currently not supported
    221221       *  on versions of the m68k without a HW intr stack.
     
    230230        move.l  #0,a7@-               | argv
    231231        move.l  #0,a7@-               | argc
    232         jsr     SYM (main)
     232        jsr     SYM (boot_card)
    233233
    234234        nop
  • c/src/lib/libbsp/m68k/gen68302/start302/start302.s

    r2b4aec8 re2a2ec60  
    217217
    218218      /*
    219        *  RTEMS should maintiain a separate interrupt stack on CPUs
     219       *  RTEMS should maintain a separate interrupt stack on CPUs
    220220       *  without one in hardware.  This is currently not supported
    221221       *  on versions of the m68k without a HW intr stack.
     
    230230        move.l  #0,a7@-               | argv
    231231        move.l  #0,a7@-               | argc
    232         jsr     SYM (main)
     232        jsr     SYM (boot_card)
    233233
    234234        nop
  • c/src/lib/libbsp/m68k/gen68302/startup/Makefile.in

    r2b4aec8 re2a2ec60  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspstart bspclean sbrk setvec
     14C_PIECES=bspclean bspstart main sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c

    r2b4aec8 re2a2ec60  
    148148}
    149149
    150 int main(
    151   int argc,
    152   char **argv,
    153   char **environp
    154 )
    155 {
    156   if ((argc > 0) && argv && argv[0])
    157     rtems_progname = argv[0];
    158   else
    159     rtems_progname = "RTEMS";
     150void bsp_start( void )
     151{
    160152
    161153  /*
     
    240232   */
    241233
    242   /*
    243    *  Start RTEMS
    244    */
    245 
    246   rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
    247 
    248   bsp_cleanup();
    249 
    250   return 0;
    251 }
     234}
  • c/src/lib/libbsp/m68k/gen68360/start/start360.s

    r2b4aec8 re2a2ec60  
    402402        movel   d0,a7@-                 | argv
    403403        movel   d0,a7@-                 | argc
    404         jsr     SYM(main)               | Call C main
     404        jsr     SYM(boot_card)          | Call C main
    405405
    406406        PUBLIC (_mainDone)
  • c/src/lib/libbsp/m68k/gen68360/start360/start360.s

    r2b4aec8 re2a2ec60  
    402402        movel   d0,a7@-                 | argv
    403403        movel   d0,a7@-                 | argc
    404         jsr     SYM(main)               | Call C main
     404        jsr     SYM(boot_card)          | Call C main
    405405
    406406        PUBLIC (_mainDone)
  • c/src/lib/libbsp/m68k/gen68360/startup/Makefile.in

    r2b4aec8 re2a2ec60  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=alloc360 bspstart bspclean init68360 memcpy sbrk setvec
     14C_PIECES=alloc360 bspclean bspstart init68360 main memcpy sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c

    r2b4aec8 re2a2ec60  
    144144}
    145145
    146 int main(
    147   int argc,
    148   char **argv,
    149   char **environp
    150 )
     146void bsp_start( void )
    151147{
    152148  extern void *_WorkspaceBase;
    153   if ((argc > 0) && argv && argv[0])
    154     rtems_progname = argv[0];
    155   else
    156     rtems_progname = "RTEMS";
    157149
    158150  /*
     
    235227   *  Don't forget the other CPU Table entries.
    236228   */
    237 
    238   /*
    239    *  Start RTEMS
    240    */
    241 
    242   rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
    243 
    244   bsp_cleanup();
    245 
    246   return 0;
    247 }
     229}
  • c/src/lib/libbsp/m68k/idp/startup/Makefile.in

    r2b4aec8 re2a2ec60  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspstart sbrk setvec
     14C_PIECES=bspclean bspstart main sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/m68k/idp/startup/bspstart.c

    r2b4aec8 re2a2ec60  
    149149}
    150150
    151 int main(
    152   int argc,
    153   char **argv,
    154   char **environp
    155 )
     151void bsp_start( void )
    156152{
    157153  m68k_isr_entry *monitors_vector_table;
    158154  int             index;
    159 
    160   if ((argc > 0) && argv && argv[0])
    161     rtems_progname = argv[0];
    162   else
    163     rtems_progname = "RTEMS";
    164155
    165156  duart_base = (unsigned char *)DUART_ADDR;
     
    249240
    250241/*  led_putnum('e'); * for debugging purposes only */
    251   rtems_initialize_executive( &BSP_Configuration, &Cpu_table );/* does not return */
    252  
     242
    253243  /* Clock_exit is done as an atexit() function */
    254 
    255   return 0;
    256 }
     244}
  • c/src/lib/libbsp/m68k/mvme136/startup/Makefile.in

    r2b4aec8 re2a2ec60  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bspstart sbrk setvec
     14C_PIECES=bspclean bspstart main sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c

    r2b4aec8 re2a2ec60  
    142142}
    143143
    144 
    145 int main(
    146   int argc,
    147   char **argv,
    148   char **environp
    149 )
     144void bsp_start( void )
    150145{
    151146  m68k_isr_entry *monitors_vector_table;
    152147  int             index;
    153 
    154   if ((argc > 0) && argv && argv[0])
    155     rtems_progname = argv[0];
    156   else
    157     rtems_progname = "RTEMS";
    158148
    159149  monitors_vector_table = (m68k_isr_entry *)0;   /* 135Bug Vectors are at 0 */
     
    230220
    231221  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    232 
    233   rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
    234   /* does not return */
    235 
    236   bsp_cleanup();
    237 
    238   return 0;
    239 }
     222}
  • c/src/lib/libbsp/m68k/mvme147/startup/Makefile.in

    r2b4aec8 re2a2ec60  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bspstart sbrk setvec
     14C_PIECES=bspclean bspstart main sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c

    r2b4aec8 re2a2ec60  
    145145}
    146146
    147 
    148 int main(
    149   int argc,
    150   char **argv,
    151   char **environp
    152 )
     147void bsp_start( void )
    153148{
    154149  m68k_isr_entry *monitors_vector_table;
    155150  int             index;
    156 
    157   if ((argc > 0) && argv && argv[0])
    158     rtems_progname = argv[0];
    159   else
    160     rtems_progname = "RTEMS";
    161151
    162152  monitors_vector_table = (m68k_isr_entry *)0;   /* 135Bug Vectors are at 0 */
     
    236226
    237227  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    238 
    239   rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
    240   /* does not return */
    241 
    242   bsp_cleanup();
    243 
    244   return 0;
    245 }
     228}
  • c/src/lib/libbsp/m68k/mvme147s/startup/Makefile.in

    r2b4aec8 re2a2ec60  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bspstart sbrk setvec
     14C_PIECES=bspclean bspstart main sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c

    r2b4aec8 re2a2ec60  
    145145}
    146146
    147 
    148 int main(
    149   int argc,
    150   char **argv,
    151   char **environp
    152 )
     147void bsp_start( void )
    153148{
    154149  m68k_isr_entry *monitors_vector_table;
    155150  int             index;
    156151  rtems_unsigned8 node_number;
    157 
    158   if ((argc > 0) && argv && argv[0])
    159     rtems_progname = argv[0];
    160   else
    161     rtems_progname = "RTEMS";
    162152
    163153  monitors_vector_table = (m68k_isr_entry *)0;   /* 147Bug Vectors are at 0 */
     
    296286
    297287  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    298 
    299   rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
    300   /* does not return */
    301 
    302   bsp_cleanup();
    303 
    304   return 0;
    305 }
     288}
  • c/src/lib/libbsp/m68k/mvme162/startup/Makefile.in

    r2b4aec8 re2a2ec60  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bspstart page_table sbrk setvec
     14C_PIECES=bspclean bspstart main page_table sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c

    r2b4aec8 re2a2ec60  
    149149}
    150150
    151 int main(
    152   int argc,
    153   char **argv,
    154   char **environp
    155 )
     151void bsp_start( void )
    156152{
    157153  m68k_isr_entry *monitors_vector_table;
    158154  int             index;
    159 
    160   if ((argc > 0) && argv && argv[0])
    161     rtems_progname = argv[0];
    162   else
    163     rtems_progname = "RTEMS";
    164155
    165156  /*
     
    253244  BSP_Configuration.work_space_start = (void *)
    254245     (RAM_END - BSP_Configuration.work_space_size);
    255 
    256   rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
    257   /* does not return */
    258 
    259   bsp_cleanup();
    260 
    261   return 0;
    262 }
     246}
  • c/src/lib/libbsp/m68k/ods68302/start/cpuboot.c

    r2b4aec8 re2a2ec60  
    111111  */
    112112
    113 void boot_bsp();
     113void boot_card();
    114114void set_debug_traps();
    115115void breakpoint();
     
    128128 
    129129  /* boot the bsp, what ever this means */
    130   boot_bsp();
     130  boot_card();
    131131
    132132  WATCHDOG_TRIGGER();
  • c/src/lib/libbsp/m68k/ods68302/start302/cpuboot.c

    r2b4aec8 re2a2ec60  
    111111  */
    112112
    113 void boot_bsp();
     113void boot_card();
    114114void set_debug_traps();
    115115void breakpoint();
     
    128128 
    129129  /* boot the bsp, what ever this means */
    130   boot_bsp();
     130  boot_card();
    131131
    132132  WATCHDOG_TRIGGER();
  • c/src/lib/libbsp/m68k/ods68302/startup/Makefile.in

    r2b4aec8 re2a2ec60  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=crc debugport gdb-hooks m68302scc m68k-stub memcheck trace \
     14C_PIECES=crc debugport gdb-hooks main m68302scc m68k-stub memcheck trace \
    1515                bspstart bspclean sbrk setvec
    1616C_FILES=$(C_PIECES:%=%.c)
  • c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c

    r2b4aec8 re2a2ec60  
    149149}
    150150
    151 void bsp_start()
     151void bsp_start( void )
    152152{
    153153  /*
     
    231231   *  Don't forget the other CPU Table entries.
    232232   */
    233 
    234   /*
    235    *  Start RTEMS
    236    */
    237 
    238   bsp_isr_level = rtems_initialize_executive_early( &BSP_Configuration, &Cpu_table );
    239 }
    240 
    241 int main(int argc, char **argv, char **environ)
    242 {
    243   if ((argc > 0) && argv && argv[0])
    244     rtems_progname = argv[0];
    245   else
    246     rtems_progname = "RTEMS";
    247 
    248   rtems_initialize_executive_late( bsp_isr_level );
    249 
    250   bsp_cleanup();
    251 
    252   return 0;
    253 }
    254 
    255 void boot_bsp()
    256 {
    257   /* the atexit hook will be before the static destructor list's entry
    258      point */
    259   bsp_start();
    260 
    261   exit(main(0, 0, 0));
    262 }
    263 
     233}
  • c/src/lib/libbsp/m68k/ods68302/startup/cpuboot.c

    r2b4aec8 re2a2ec60  
    111111  */
    112112
    113 void boot_bsp();
     113void boot_card();
    114114void set_debug_traps();
    115115void breakpoint();
     
    128128 
    129129  /* boot the bsp, what ever this means */
    130   boot_bsp();
     130  boot_card();
    131131
    132132  WATCHDOG_TRIGGER();
  • c/src/lib/libbsp/mips/p4000/include/bsp.h

    r2b4aec8 re2a2ec60  
    111111/* miscellaneous stuff assumed to exist */
    112112
    113 int bsp_start(
    114   int   argc,
    115   char **argv,
    116   char **environp
    117 );
    118 
    119 void bsp_cleanup( void );
    120 
    121113mips_isr_entry set_vector(                      /* returns old vector */
    122114  rtems_isr_entry     handler,                  /* isr routine        */
  • c/src/lib/libbsp/mips/p4000/startup/bspclean.c

    r2b4aec8 re2a2ec60  
    3333void bsp_cleanup( void )
    3434{
     35  idtsim__exit();
    3536}
  • c/src/lib/libbsp/mips/p4000/startup/bspstart.c

    r2b4aec8 re2a2ec60  
    162162extern int end; /* defined by linker */
    163163
    164 int bsp_start(
    165   int argc,
    166   char **argv,
    167   char **environp
    168 )
    169 {
    170   if ((argc > 0) && argv && argv[0])
    171     rtems_progname = argv[0];
    172   else
    173     rtems_progname = "RTEMS";
    174 
     164void bsp_start( void )
     165{
    175166  /*
    176167   *  Allocate the memory for the RTEMS Work Space.  This can come from
     
    257248   */
    258249
    259   /*
    260    *  Start RTEMS
    261    */
    262 
    263   rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
    264 
    265   bsp_cleanup();
    266 
    267   return 0;
    268 }
     250}
  • c/src/lib/libbsp/mips64orion/p4000/include/bsp.h

    r2b4aec8 re2a2ec60  
    111111/* miscellaneous stuff assumed to exist */
    112112
    113 int bsp_start(
    114   int   argc,
    115   char **argv,
    116   char **environp
    117 );
    118 
    119 void bsp_cleanup( void );
    120 
    121113mips_isr_entry set_vector(                      /* returns old vector */
    122114  rtems_isr_entry     handler,                  /* isr routine        */
  • c/src/lib/libbsp/mips64orion/p4000/startup/bspclean.c

    r2b4aec8 re2a2ec60  
    3333void bsp_cleanup( void )
    3434{
     35  idtsim__exit();
    3536}
  • c/src/lib/libbsp/mips64orion/p4000/startup/bspstart.c

    r2b4aec8 re2a2ec60  
    162162extern int end; /* defined by linker */
    163163
    164 int bsp_start(
    165   int argc,
    166   char **argv,
    167   char **environp
    168 )
    169 {
    170   if ((argc > 0) && argv && argv[0])
    171     rtems_progname = argv[0];
    172   else
    173     rtems_progname = "RTEMS";
    174 
     164void bsp_start( void )
     165{
    175166  /*
    176167   *  Allocate the memory for the RTEMS Work Space.  This can come from
     
    257248   */
    258249
    259   /*
    260    *  Start RTEMS
    261    */
    262 
    263   rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
    264 
    265   bsp_cleanup();
    266 
    267   return 0;
    268 }
     250}
  • c/src/lib/libbsp/powerpc/papyrus/dlentry/dlentry.s

    r2b4aec8 re2a2ec60  
    224224        stw     r3, 8(r1)
    225225        stw     r3, 12(r1)
    226         .extern SYM (main)
    227         b       SYM (main)                       /* call the first C routine */
     226        .extern SYM (boot_card)
     227        b       SYM (boot_card)          /* call the first C routine */
    228228
    229229/*-------------------------------------------------------------------------------
  • c/src/lib/libbsp/powerpc/papyrus/flashentry/flashentry.s

    r2b4aec8 re2a2ec60  
    246246        stw     r3, 8(r1)
    247247        stw     r3, 12(r1)
    248         .extern SYM (main)
    249         b       SYM (main)            /* call the first C routine */
     248        .extern SYM (boot_card)
     249        b       SYM (boot_card)          /* call the first C routine */
    250250
    251251/*-------------------------------------------------------------------------------
  • c/src/lib/libbsp/powerpc/papyrus/include/bsp.h

    r2b4aec8 re2a2ec60  
    132132/* functions */
    133133
    134 int bsp_start(
    135   int   argc,
    136   char **argv,
    137   char **environp
    138 );
    139 
    140 void bsp_cleanup( void );
    141 
    142134rtems_isr_entry set_vector(                    /* returns old vector */
    143135  rtems_isr_entry     handler,                  /* isr routine        */
  • c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c

    r2b4aec8 re2a2ec60  
    167167}
    168168
    169 int bsp_start(
    170   int argc,
    171   char **argv,
    172   char **environp
    173 )
    174 {
    175   if ((argc > 0) && argv && argv[0])
    176     rtems_progname = argv[0];
    177   else
    178     rtems_progname = "RTEMS";
    179 
     169void bsp_start( void )
     170{
    180171  /*
    181172   *  Allocate the memory for the RTEMS Work Space.  This can come from
     
    266257
    267258  Cpu_table.timer_least_valid = 3;
    268 
    269   /*
    270    *  Start RTEMS
    271    */
    272 
    273   rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
    274 
    275   bsp_cleanup();
    276 }
     259}
  • c/src/lib/libbsp/sh/gensh1/include/bsp.h

    r2b4aec8 re2a2ec60  
    8585extern rtems_configuration_table BSP_Configuration;
    8686
    87 extern int bsp_start( int argc, char **argv, char **env );
    88 
    8987extern void bsp_cleanup( void );
    9088
  • c/src/lib/libbsp/sh/gensh1/startup/bspclean.c

    r2b4aec8 re2a2ec60  
    3838void bsp_cleanup( void )
    3939{
     40  rtems_fatal_error_occurred(0);
    4041}
  • c/src/lib/libbsp/sh/gensh1/startup/bspstart.c

    r2b4aec8 re2a2ec60  
    152152}
    153153
    154 int bsp_start(
    155   int argc,
    156   char **argv,
    157   char **environp
    158 )
     154void bsp_start(void)
    159155{
    160156  /*
     
    166162   */
    167163   
    168   if ((argc > 0) && argv && argv[0])
    169     rtems_progname = argv[0];
    170   else
    171     rtems_progname = "RTEMS";
    172 
    173164  /*
    174165   *  Allocate the memory for the RTEMS Work Space.  This can come from
     
    266257
    267258  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    268 
    269   /*
    270    *  Start RTEMS
    271    */
    272 
    273   rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
    274 
    275   bsp_cleanup();
    276 
    277   return 0;
    278 }
     259}
  • c/src/lib/libbsp/sparc/erc32/include/bsp.h

    r2b4aec8 re2a2ec60  
    172172extern rtems_cpu_table           Cpu_table;             /* owned by BSP */
    173173
    174 extern rtems_unsigned32          bsp_isr_level;
    175 
    176174#ifdef __cplusplus
    177175}
  • c/src/lib/libbsp/sparc/erc32/start/startsis.s

    r2b4aec8 re2a2ec60  
    290290        mov     %0, %o1                 ! argv
    291291        mov     %0, %o0                 ! argc
    292         call    SYM(main)
    293         sub     %sp, 0x60, %sp          ! room for main to save args
     292        call    SYM(boot_card)
     293        sub     %sp, 0x60, %sp          ! room for boot_card to save args
    294294        nop
    295295
  • c/src/lib/libbsp/sparc/erc32/startsis/startsis.s

    r2b4aec8 re2a2ec60  
    290290        mov     %0, %o1                 ! argv
    291291        mov     %0, %o0                 ! argc
    292         call    SYM(main)
    293         sub     %sp, 0x60, %sp          ! room for main to save args
     292        call    SYM(boot_card)
     293        sub     %sp, 0x60, %sp          ! room for boot_card to save args
    294294        nop
    295295
  • c/src/lib/libbsp/sparc/erc32/startup/Makefile.in

    r2b4aec8 re2a2ec60  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bspstart sbrk setvec spurious
     14C_PIECES=bspclean bspstart main sbrk setvec spurious
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
    17 
    18 CC_PIECES=rtems-ctor
    19 CC_FILES=$(CC_PIECES:%=%.cc)
    20 CC_O_FILES=$(CC_PIECES:%=${ARCH}/%.o)
    2117
    2218H_FILES=
     
    2925SRCS=linkcmds $(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES)
    3026OBJS=$(C_O_FILES)
    31 
    32 # We install the RTEMS constructor as a separate .o
    33 # so it can be easily place correctly by the compiler config file.
    34 INSTALLED_O_FILES=$(ARCH)/rtems-ctor.o
    3527
    3628include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
     
    6254        $(make-rel)
    6355
    64 all:    ${ARCH} $(SRCS) $(INSTALLED_O_FILES) $(PGM)
     56all:    ${ARCH} $(SRCS) $(PGM)
    6557        $(INSTALL) $(srcdir)/linkcmds ${PROJECT_RELEASE}/lib
    66         $(INSTALL_VARIANT) $(INSTALLED_O_FILES) ${PROJECT_RELEASE}/lib
  • c/src/lib/libbsp/sparc/erc32/startup/bspstart.c

    r2b4aec8 re2a2ec60  
    373373
    374374  rtems_libio_config( &BSP_Configuration, BSP_LIBIO_MAX_FDS );
    375  
    376   bsp_isr_level = rtems_initialize_executive_early(
    377      &BSP_Configuration,
    378      &Cpu_table
    379   );
    380 }
     375}
  • c/src/lib/start/i960/start.s

    r2b4aec8 re2a2ec60  
    7575
    7676        /*
    77          * Call application mainline.
     77         * Call application boot_card.
    7878         *      Someday, real values of argc and argv will be set up.
    7979         *      For now, they are set to 0.
     
    8282        ldconst 0,g1
    8383        ldconst 0,g2
    84         call    _main
     84        call    _boot_card
    8585        ret
    8686
  • c/src/lib/start/m68k/start.s

    r2b4aec8 re2a2ec60  
    8888
    8989      /*
    90        *  RTEMS should maintiain a separate interrupt stack on CPUs
     90       *  RTEMS should maintain a separate interrupt stack on CPUs
    9191       *  without one in hardware.  This is currently not supported
    9292       *  on versions of the m68k without a HW intr stack.
     
    103103        movel   #0,a7@-               | push argc
    104104
    105         jsr     SYM (main)
     105        jsr     SYM (boot_card)
    106106        addl    #12,a7
    107107
Note: See TracChangeset for help on using the changeset viewer.