Changeset b6394ae in rtems for c/src/lib/libbsp/m68k


Ignore:
Timestamp:
Apr 15, 1998, 3:13:01 PM (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
bd9c3d1
Parents:
b3d3a34e
Message:

Transitioned to shared bsp_libc_init() and cleaned up comments.

Location:
c/src/lib/libbsp/m68k
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/dmv152/startup/Makefile.in

    rb3d3a34e rb6394ae  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bsppost bspstart main sbrk setvec vmeintr
     14C_PIECES=bspclean bsplibc bsppost 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

    rb3d3a34e rb6394ae  
    1 /*  bsp_start()
    2  *
     1/*
    32 *  This routine starts the application.  It includes application,
    43 *  board, and monitor specific initialization and configuration.
    54 *  The generic CPU dependent initialization has been performed
    65 *  before this routine is invoked.
    7  *
    8  *  INPUT:  NONE
    9  *
    10  *  OUTPUT: NONE
    116 *
    127 *  COPYRIGHT (c) 1989-1998.
     
    4035char *rtems_progname;
    4136
    42 /*      Initialize whatever libc we are using
    43  *      called from postdriver hook
     37/*
     38 *  Use the shared implementations of the following routines
    4439 */
    45 
    46 void bsp_libc_init()
    47 {
    48     extern int end;
    49     rtems_unsigned32        heap_start;
    50 
    51     heap_start = (rtems_unsigned32) &end;
    52     if (heap_start & (CPU_ALIGNMENT-1))
    53         heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
    54 
    55     RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
    56 
    57     /*
    58      *  Init the RTEMS libio facility to provide UNIX-like system
    59      *  calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
    60      *  Uses malloc() to get area for the iops, so must be after malloc init
    61      */
    62 
    63     rtems_libio_init();
    64 
    65     /*
    66      * Set up for the libc handling.
    67      */
    68 
    69     if (BSP_Configuration.ticks_per_timeslice > 0)
    70         libc_init(1);                /* reentrant if possible */
    71     else
    72         libc_init(0);                /* non-reentrant */
    73 }
     40 
     41void bsp_postdriver_hook(void);
     42void bsp_libc_init( void *, unsigned32, int );
    7443
    7544/*
     
    8756 */
    8857 
    89 void
    90 bsp_pretasking_hook(void)
     58void bsp_pretasking_hook(void)
    9159{
    92     bsp_libc_init();
     60    extern int end;
     61    rtems_unsigned32        heap_start;
     62
     63    heap_start = (rtems_unsigned32) &end;
     64    if (heap_start & (CPU_ALIGNMENT-1))
     65        heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
     66
     67    bsp_libc_init((void *) heap_start, 64 * 1024, 0);
    9368 
    9469#ifdef RTEMS_DEBUG
     
    9772}
    9873 
    99 
    10074/*
    101  *  Use the shared bsp_postdriver_hook() implementation
     75 *  bsp_start
     76 *
     77 *  This routine does the bulk of the system initialization.
    10278 */
    103  
    104 void bsp_postdriver_hook(void);
    10579
    10680void bsp_start( void )
  • c/src/lib/libbsp/m68k/efi332/startup/Makefile.in

    rb3d3a34e rb6394ae  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bsppost bspstart bspclean main sbrk setvec
     14C_PIECES=bsplibc bsppost 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

    rb3d3a34e rb6394ae  
    1 /*  bsp_start()
    2  *
     1/*
    32 *  This routine starts the application.  It includes application,
    43 *  board, and monitor specific initialization and configuration.
    54 *  The generic CPU dependent initialization has been performed
    65 *  before this routine is invoked.
    7  *
    8  *  INPUT:  NONE
    9  *
    10  *  OUTPUT: NONE
    116 *
    127 *  COPYRIGHT (c) 1989-1998.
     
    3934char *rtems_progname;
    4035
    41 /*      Initialize whatever libc we are using
    42  *      called from postdriver hook
     36/*
     37 *  Use the shared implementations of the following routines
    4338 */
     39 
     40void bsp_postdriver_hook(void);
     41void bsp_libc_init( void *, unsigned32, int );
    4442
    45 void bsp_libc_init()
     43/*
     44 *  Function:   bsp_pretasking_hook
     45 *  Created:    95/03/10
     46 *
     47 *  Description:
     48 *      BSP pretasking hook.  Called just before drivers are initialized.
     49 *      Used to setup libc and install any BSP extensions.
     50 *
     51 *  NOTES:
     52 *      Must not use libc (to do io) from here, since drivers are
     53 *      not yet initialized.
     54 *
     55 */
     56 
     57void bsp_pretasking_hook(void)
    4658{
    4759/*   extern int end; */
     
    5971  }
    6072
    61   RTEMS_Malloc_Initialize((void *) heap_start,
    62                           (RAM_END - heap_start), 0);
    63    
    64   /*
    65    *  Init the RTEMS libio facility to provide UNIX-like system
    66    *  calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
    67    *  Uses malloc() to get area for the iops, so must be after malloc init
    68    */
    69 
    70   rtems_libio_init();
    71 
    72   /*
    73    * Set up for the libc handling.
    74    */
    75  
    76   if (BSP_Configuration.ticks_per_timeslice > 0)
    77     libc_init(1);                /* reentrant if possible */
    78   else
    79     libc_init(0);                /* non-reentrant */
    80 }
    81 
    82 /*
    83  *  Function:   bsp_pretasking_hook
    84  *  Created:    95/03/10
    85  *
    86  *  Description:
    87  *      BSP pretasking hook.  Called just before drivers are initialized.
    88  *      Used to setup libc and install any BSP extensions.
    89  *
    90  *  NOTES:
    91  *      Must not use libc (to do io) from here, since drivers are
    92  *      not yet initialized.
    93  *
    94  */
    95  
    96 void
    97 bsp_pretasking_hook(void)
    98 {
    99     bsp_libc_init();
     73  bsp_libc_init((void *) heap_start, (RAM_END - heap_start), 0);
    10074 
    10175#ifdef RTEMS_DEBUG
     
    10478}
    10579 
    106  
    10780/*
    108  *  Use the shared bsp_postdriver_hook() implementation
     81 *  bsp_start
     82 *
     83 *  This routine does the bulk of the system initialization.
    10984 */
    110  
    111 void bsp_postdriver_hook(void);
    11285
    11386void bsp_start( void )
  • c/src/lib/libbsp/m68k/efi68k/startup/Makefile.in

    rb3d3a34e rb6394ae  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bsppost bspstart bspclean efi68k_tcp efi68k_wd main sbrk setvec
     14C_PIECES=bsplibc bsppost 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

    rb3d3a34e rb6394ae  
    1 /*  bsp_start()
    2  *
     1/*
    32 *  This routine starts the application.  It includes application,
    43 *  board, and monitor specific initialization and configuration.
    54 *  The generic CPU dependent initialization has been performed
    65 *  before this routine is invoked.
    7  *
    8  *  INPUT:  NONE
    9  *
    10  *  OUTPUT: NONE
    116 *
    127 *  COPYRIGHT (c) 1989-1998.
     
    4439extern void breakpoint(void);
    4540
    46 /*      Initialize whatever libc we are using
    47  *      called from postdriver hook
     41/*
     42 *  Use the shared implementations of the following routines
    4843 */
     44 
     45void bsp_postdriver_hook(void);
     46void bsp_libc_init( void *, unsigned32, int );
    4947
    50 void bsp_libc_init()
     48/*
     49 *  Function:   bsp_pretasking_hook
     50 *  Created:    95/03/10
     51 *
     52 *  Description:
     53 *      BSP pretasking hook.  Called just before drivers are initialized.
     54 *      Used to setup libc and install any BSP extensions.
     55 *
     56 *  NOTES:
     57 *      Must not use libc (to do io) from here, since drivers are
     58 *      not yet initialized.
     59 *
     60 */
     61 
     62void bsp_pretasking_hook(void)
    5163{
    5264/*   extern int end; */
     
    6476  }
    6577
    66   RTEMS_Malloc_Initialize((void *) heap_start,
    67                           (RAM_END - heap_start), 0);
    68    
    69   /*
    70    *  Init the RTEMS libio facility to provide UNIX-like system
    71    *  calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
    72    *  Uses malloc() to get area for the iops, so must be after malloc init
    73    */
    74 
    75   rtems_libio_init();
    76 
    77   /*
    78    * Set up for the libc handling.
    79    */
    80  
    81   if (BSP_Configuration.ticks_per_timeslice > 0)
    82     libc_init(1);                /* reentrant if possible */
    83   else
    84     libc_init(0);                /* non-reentrant */
    85 }
    86  
    87 /*
    88  *  Function:   bsp_pretasking_hook
    89  *  Created:    95/03/10
    90  *
    91  *  Description:
    92  *      BSP pretasking hook.  Called just before drivers are initialized.
    93  *      Used to setup libc and install any BSP extensions.
    94  *
    95  *  NOTES:
    96  *      Must not use libc (to do io) from here, since drivers are
    97  *      not yet initialized.
    98  *
    99  */
    100  
    101 void
    102 bsp_pretasking_hook(void)
    103 {
    104     bsp_libc_init();
     78  bsp_libc_init((void *) heap_start, (RAM_END - heap_start), 0);
    10579 
    10680#ifdef RTEMS_DEBUG
     
    10983}
    11084 
    111  
    11285/*
    113  *  Use the shared bsp_postdriver_hook() implementation
     86 *  bsp_start
     87 *
     88 *  This routine does the bulk of the system initialization.
    11489 */
    115  
    116 void bsp_postdriver_hook(void);
    117 
    11890
    11991void bsp_start( void )
  • c/src/lib/libbsp/m68k/gen68302/startup/Makefile.in

    rb3d3a34e rb6394ae  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bsppost bspstart main sbrk setvec
     14C_PIECES=bspclean bsplibc bsppost 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

    rb3d3a34e rb6394ae  
    1 /*  bsp_start()
    2  *
     1/*
    32 *  This routine starts the application.  It includes application,
    43 *  board, and monitor specific initialization and configuration.
    54 *  The generic CPU dependent initialization has been performed
    65 *  before this routine is invoked.
    7  *
    8  *  INPUT:  NONE
    9  *
    10  *  OUTPUT: NONE
    116 *
    127 *  COPYRIGHT (c) 1989-1998.
     
    4035char *rtems_progname;
    4136
    42 /*      Initialize whatever libc we are using
    43  *      called from postdriver hook
     37/*
     38 *  Use the shared implementations of the following routines
    4439 */
    45 
    46 void bsp_libc_init()
    47 {
    48     extern int end;
    49     rtems_unsigned32        heap_start;
    50 
    51     heap_start = (rtems_unsigned32) &end;
    52     if (heap_start & (CPU_ALIGNMENT-1))
    53         heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
    54 
    55     /*
    56      *  The last parameter to RTEMS_Malloc_Initialize is the "chunk"
    57      *  size which a multiple of will be requested on each sbrk()
    58      *  call by malloc().  A value of 0 indicates that sbrk() should
    59      *  not be called to extend the heap.
    60      */
    61 
    62     RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
    63 
    64     /*
    65      *  Init the RTEMS libio facility to provide UNIX-like system
    66      *  calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
    67      *  Uses malloc() to get area for the iops, so must be after malloc init
    68      */
    69 
    70     rtems_libio_init();
    71 
    72     /*
    73      * Set up for the libc handling.
    74      */
    75 
    76     if (BSP_Configuration.ticks_per_timeslice > 0)
    77         libc_init(1);                /* reentrant if possible */
    78     else
    79         libc_init(0);                /* non-reentrant */
    80 }
     40 
     41void bsp_postdriver_hook(void);
     42void bsp_libc_init( void *, unsigned32, int );
    8143
    8244/*
     
    9456 */
    9557 
    96 void
    97 bsp_pretasking_hook(void)
     58void bsp_pretasking_hook(void)
    9859{
    99     bsp_libc_init();
     60    extern int end;
     61    rtems_unsigned32        heap_start;
     62
     63    heap_start = (rtems_unsigned32) &end;
     64    if (heap_start & (CPU_ALIGNMENT-1))
     65        heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
     66
     67    bsp_libc_init((void *) heap_start, 64 * 1024, 0);
     68
    10069 
    10170#ifdef RTEMS_DEBUG
     
    10372#endif
    10473}
    105  
    10674
    10775/*
    108  *  Use the shared bsp_postdriver_hook() implementation
     76 *  bsp_start
     77 *
     78 *  This routine does the bulk of the system initialization.
    10979 */
    110  
    111 void bsp_postdriver_hook(void);
    112 
    11380
    11481void bsp_start( void )
  • c/src/lib/libbsp/m68k/gen68360/startup/Makefile.in

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

    rb3d3a34e rb6394ae  
    1 /*  bsp_start()
    2  *
     1/*
    32 *  This routine starts the application.  It includes application,
    43 *  board, and monitor specific initialization and configuration.
    54 *  The generic CPU dependent initialization has been performed
    65 *  before this routine is invoked.
    7  *
    8  *  INPUT:  NONE
    9  *
    10  *  OUTPUT: NONE
    116 *
    127 *  COPYRIGHT (c) 1989-1998.
     
    4035char *rtems_progname;
    4136
    42 /*      Initialize whatever libc we are using
    43  *      called from postdriver hook
     37/*
     38 *  Use the shared implementations of the following routines
    4439 */
    45 
    46 void bsp_libc_init()
    47 {
    48     extern void *_HeapStart;
    49     extern rtems_unsigned32 _HeapSize;
    50 
    51     /*
    52      *  The last parameter to RTEMS_Malloc_Initialize is the "chunk"
    53      *  size which a multiple of will be requested on each sbrk()
    54      *  call by malloc().  A value of 0 indicates that sbrk() should
    55      *  not be called to extend the heap.
    56      */
    57 
    58     RTEMS_Malloc_Initialize(&_HeapStart, _HeapSize, 0);
    59 
    60     /*
    61      *  Init the RTEMS libio facility to provide UNIX-like system
    62      *  calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
    63      *  Uses malloc() to get area for the iops, so must be after malloc init
    64      */
    65 
    66     rtems_libio_init();
    67 
    68     /*
    69      * Set up for the libc handling.
    70      */
    71 
    72     if (BSP_Configuration.ticks_per_timeslice > 0)
    73         libc_init(1);                /* reentrant if possible */
    74     else
    75         libc_init(0);                /* non-reentrant */
    76 }
     40 
     41void bsp_postdriver_hook(void);
     42void bsp_libc_init( void *, unsigned32, int );
    7743
    7844/*
     
    9056 */
    9157 
    92 void
    93 bsp_pretasking_hook(void)
     58void bsp_pretasking_hook(void)
    9459{
    95     bsp_libc_init();
     60    extern void *_HeapStart;
     61    extern rtems_unsigned32 _HeapSize;
     62
     63    bsp_libc_init(&_HeapStart, _HeapSize, 0);
    9664 
    9765#ifdef RTEMS_DEBUG
     
    10068}
    10169 
    102 
    10370/*
    104  *  Use the shared bsp_postdriver_hook() implementation
     71 *  bsp_start
     72 *
     73 *  This routine does the bulk of the system initialization.
    10574 */
    106  
    107 void bsp_postdriver_hook(void);
    10875
    10976void bsp_start( void )
  • c/src/lib/libbsp/m68k/idp/startup/Makefile.in

    rb3d3a34e rb6394ae  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bsppost bspstart main sbrk setvec
     14C_PIECES=bspclean bsplibc bsppost 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

    rb3d3a34e rb6394ae  
    1 /*  bsp_start()
    2  *
     1/*
    32 *  This routine starts the application.  It includes application,
    43 *  board, and monitor specific initialization and configuration.
     
    65 *  before this routine is invoked.
    76 *
    8  *  INPUT:  NONE
    9  *
    10  *  OUTPUT: NONE
    11  *
    127 *  COPYRIGHT (c) 1989-1998.
    138 *  On-Line Applications Research Corporation (OAR).
     
    4742char *rtems_progname;
    4843
    49 /*      Initialize whatever libc we are using
    50  *      called from postdriver hook
     44/*
     45 *  Use the shared implementations of the following routines
    5146 */
    5247 
    53 void bsp_libc_init()
    54 {
    55     extern int end;
    56     rtems_unsigned32        heap_start;
    57  
    58     heap_start = (rtems_unsigned32) &end;
    59     if (heap_start & (CPU_ALIGNMENT-1))
    60         heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
    61  
    62         /* Create 64 KByte memory region for RTEMS executive */
    63     RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
    64 
    65     /*
    66      *  Init the RTEMS libio facility to provide UNIX-like system
    67      *  calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
    68      *  Uses malloc() to get area for the iops, so must be after malloc init
    69      */
    70 
    71     rtems_libio_init();
    72  
    73     /*
    74      * Set up for the libc handling.
    75      */
    76  
    77     if (BSP_Configuration.ticks_per_timeslice > 0)
    78         libc_init(1);                /* reentrant if possible */
    79         else
    80         libc_init(0);                /* non-reentrant */
    81 }
     48void bsp_postdriver_hook(void);
     49void bsp_libc_init( void *, unsigned32, int );
    8250
    8351/*
     
    9563 */
    9664 
    97 void
    98 bsp_pretasking_hook(void)
     65void bsp_pretasking_hook(void)
    9966{
    100     bsp_libc_init();
     67    extern int end;
     68    rtems_unsigned32        heap_start;
     69 
     70    heap_start = (rtems_unsigned32) &end;
     71    if (heap_start & (CPU_ALIGNMENT-1))
     72        heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
     73 
     74        /* Create 64 KByte memory region for RTEMS executive */
     75    bsp_libc_init((void *) heap_start, 64 * 1024, 0);
    10176 
    10277#ifdef RTEMS_DEBUG
     
    10580}
    10681 
    107 
    10882/*
    109  *  Use the shared bsp_postdriver_hook() implementation
     83 *  bsp_start
     84 *
     85 *  This routine does the bulk of the system initialization.
    11086 */
    111  
    112 void bsp_postdriver_hook(void);
    11387
    11488void bsp_start( void )
  • c/src/lib/libbsp/m68k/mvme136/startup/Makefile.in

    rb3d3a34e rb6394ae  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bsppost bspstart main sbrk setvec
     14C_PIECES=bspclean bsplibc bsppost 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

    rb3d3a34e rb6394ae  
    1 /*  bsp_start()
    2  *
     1/*
    32 *  This routine starts the application.  It includes application,
    43 *  board, and monitor specific initialization and configuration.
    54 *  The generic CPU dependent initialization has been performed
    65 *  before this routine is invoked.
    7  *
    8  *  INPUT:  NONE
    9  *
    10  *  OUTPUT: NONE
    116 *
    127 *  COPYRIGHT (c) 1989-1998.
     
    4136char *rtems_progname;
    4237
    43 /*      Initialize whatever libc we are using
    44  *      called from postdriver hook
     38/*
     39 *  Use the shared implementations of the following routines
    4540 */
    46 
    47 void bsp_libc_init()
    48 {
    49     extern int end;
    50     rtems_unsigned32        heap_start;
    51 
    52     heap_start = (rtems_unsigned32) &end;
    53     if (heap_start & (CPU_ALIGNMENT-1))
    54         heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
    55 
    56     RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
    57 
    58     /*
    59      *  Init the RTEMS libio facility to provide UNIX-like system
    60      *  calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
    61      *  Uses malloc() to get area for the iops, so must be after malloc init
    62      */
    63 
    64     rtems_libio_init();
    65 
    66     /*
    67      * Set up for the libc handling.
    68      */
    69 
    70     if (BSP_Configuration.ticks_per_timeslice > 0)
    71         libc_init(1);                /* reentrant if possible */
    72     else
    73         libc_init(0);                /* non-reentrant */
    74 }
     41 
     42void bsp_postdriver_hook(void);
     43void bsp_libc_init( void *, unsigned32, int );
    7544
    7645/*
     
    8857 */
    8958 
    90 void
    91 bsp_pretasking_hook(void)
     59void bsp_pretasking_hook(void)
    9260{
    93     bsp_libc_init();
     61    extern int end;
     62    rtems_unsigned32        heap_start;
     63
     64    heap_start = (rtems_unsigned32) &end;
     65    if (heap_start & (CPU_ALIGNMENT-1))
     66        heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
     67
     68    bsp_libc_init((void *) heap_start, 64 * 1024, 0);
     69
    9470 
    9571#ifdef RTEMS_DEBUG
     
    9773#endif
    9874}
    99  
     75
    10076/*
    101  *  Use the shared bsp_postdriver_hook() implementation
     77 *  bsp_start
     78 *
     79 *  This routine does the bulk of the system initialization.
    10280 */
    103  
    104 void bsp_postdriver_hook(void);
    10581
    10682void bsp_start( void )
  • c/src/lib/libbsp/m68k/mvme147/startup/Makefile.in

    rb3d3a34e rb6394ae  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bsppost bspstart main sbrk setvec
     14C_PIECES=bspclean bsplibc bsppost 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

    rb3d3a34e rb6394ae  
    1 /*  bsp_start()
    2  *
     1/*
    32 *  This routine starts the application.  It includes application,
    43 *  board, and monitor specific initialization and configuration.
    54 *  The generic CPU dependent initialization has been performed
    65 *  before this routine is invoked.
    7  *
    8  *  INPUT:  NONE
    9  *
    10  *  OUTPUT: NONE
    116 *
    127 *  COPYRIGHT (c) 1989-1998.
     
    4439char *rtems_progname;
    4540
    46 /*      Initialize whatever libc we are using
    47  *      called from postdriver hook
     41/*
     42 *  Use the shared implementations of the following routines
    4843 */
    49 
    50 void bsp_libc_init()
    51 {
    52     extern int end;
    53     rtems_unsigned32        heap_start;
    54 
    55     heap_start = (rtems_unsigned32) &end;
    56     if (heap_start & (CPU_ALIGNMENT-1))
    57         heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
    58 
    59     RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
    60 
    61     /*
    62      *  Init the RTEMS libio facility to provide UNIX-like system
    63      *  calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
    64      *  Uses malloc() to get area for the iops, so must be after malloc init
    65      */
    66 
    67     rtems_libio_init();
    68 
    69     /*
    70      * Set up for the libc handling.
    71      */
    72 
    73     if (BSP_Configuration.ticks_per_timeslice > 0)
    74         libc_init(1);                /* reentrant if possible */
    75     else
    76         libc_init(0);                /* non-reentrant */
    77 }
     44 
     45void bsp_postdriver_hook(void);
     46void bsp_libc_init( void *, unsigned32, int );
    7847
    7948/*
     
    9160 */
    9261 
    93 void
    94 bsp_pretasking_hook(void)
     62void bsp_pretasking_hook(void)
    9563{
    96     bsp_libc_init();
     64    extern int end;
     65    rtems_unsigned32        heap_start;
     66
     67    heap_start = (rtems_unsigned32) &end;
     68    if (heap_start & (CPU_ALIGNMENT-1))
     69        heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
     70
     71    bsp_libc_init((void *) heap_start, 64 * 1024, 0);
     72
    9773 
    9874#ifdef RTEMS_DEBUG
     
    10177}
    10278 
    103 
    10479/*
    105  *  Use the shared bsp_postdriver_hook() implementation
     80 *  bsp_start
     81 *
     82 *  This routine does the bulk of the system initialization.
    10683 */
    107  
    108 void bsp_postdriver_hook(void);
    109 
    11084
    11185void bsp_start( void )
  • c/src/lib/libbsp/m68k/mvme147s/startup/Makefile.in

    rb3d3a34e rb6394ae  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bsppost bspstart main sbrk setvec
     14C_PIECES=bspclean bsplibc bsppost 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

    rb3d3a34e rb6394ae  
    1 /*  bsp_start()
    2  *
     1/*
    32 *  This routine starts the application.  It includes application,
    43 *  board, and monitor specific initialization and configuration.
     
    65 *  before this routine is invoked.
    76 *
    8  *  INPUT:  NONE
    9  *
    10  *  OUTPUT: NONE
    11  *
    127 *  COPYRIGHT (c) 1989-1998.
    138 *  On-Line Applications Research Corporation (OAR).
     
    4439char *rtems_progname;
    4540
    46 /*      Initialize whatever libc we are using
    47  *      called from postdriver hook
    48  */
    49 
    50 void bsp_libc_init()
     41/*
     42 *  Use the shared implementations of the following routines
     43 */
     44 
     45void bsp_postdriver_hook(void);
     46void bsp_libc_init( void *, unsigned32, int );
     47
     48/*
     49 *  Function:   bsp_pretasking_hook
     50 *  Created:    95/03/10
     51 *
     52 *  Description:
     53 *      BSP pretasking hook.  Called just before drivers are initialized.
     54 *      Used to setup libc and install any BSP extensions.
     55 *
     56 *  NOTES:
     57 *      Must not use libc (to do io) from here, since drivers are
     58 *      not yet initialized.
     59 *
     60 */
     61 
     62void bsp_pretasking_hook(void)
    5163{
    5264    extern int end;
     
    5769        heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
    5870
    59     RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
    60 
    61     /*
    62      *  Init the RTEMS libio facility to provide UNIX-like system
    63      *  calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
    64      *  Uses malloc() to get area for the iops, so must be after malloc init
    65      */
    66 
    67     rtems_libio_init();
    68 
    69     /*
    70      * Set up for the libc handling.
    71      */
    72 
    73     if (BSP_Configuration.ticks_per_timeslice > 0)
    74         libc_init(1);                /* reentrant if possible */
    75     else
    76         libc_init(0);                /* non-reentrant */
    77 }
    78 
    79 /*
    80  *  Function:   bsp_pretasking_hook
    81  *  Created:    95/03/10
    82  *
    83  *  Description:
    84  *      BSP pretasking hook.  Called just before drivers are initialized.
    85  *      Used to setup libc and install any BSP extensions.
    86  *
    87  *  NOTES:
    88  *      Must not use libc (to do io) from here, since drivers are
    89  *      not yet initialized.
    90  *
    91  */
    92  
    93 void
    94 bsp_pretasking_hook(void)
    95 {
    96     bsp_libc_init();
     71    bsp_libc_init((void *) heap_start, 64 * 1024, 0);
    9772 
    9873#ifdef RTEMS_DEBUG
     
    10176}
    10277 
    103 
    104 /*
    105  *  Use the shared bsp_postdriver_hook() implementation
    106  */
    107  
    108 void bsp_postdriver_hook(void);
    109 
     78/*
     79 *  bsp_start
     80 *
     81 *  This routine does the bulk of the system initialization.
     82 */
    11083
    11184void bsp_start( void )
  • c/src/lib/libbsp/m68k/mvme162/startup/Makefile.in

    rb3d3a34e rb6394ae  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bsppost bspstart main page_table sbrk setvec
     14C_PIECES=bspclean bsplibc bsppost 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

    rb3d3a34e rb6394ae  
    1 /*  bsp_start()
    2  *
     1/*
    32 *  This routine starts the application.  It includes application,
    43 *  board, and monitor specific initialization and configuration.
    54 *  The generic CPU dependent initialization has been performed
    65 *  before this routine is invoked.
    7  *
    8  *  INPUT:  NONE
    9  *
    10  *  OUTPUT: NONE
    116 *
    127 *  COPYRIGHT (c) 1989-1998.
     
    4843char *rtems_progname;
    4944
    50 /*      Initialize whatever libc we are using
    51  *      called from postdriver hook
     45/*
     46 *  Use the shared implementations of the following routines
    5247 */
    53 
    54 void bsp_libc_init()
    55 {
    56     extern int end;
    57     rtems_unsigned32        heap_start;
    58 
    59     heap_start = (rtems_unsigned32) &end;
    60     if (heap_start & (CPU_ALIGNMENT-1))
    61         heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
    62 
    63     RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
    64 
    65     /*
    66      *  Init the RTEMS libio facility to provide UNIX-like system
    67      *  calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
    68      *  Uses malloc() to get area for the iops, so must be after malloc init
    69      */
    70 
    71     rtems_libio_init();
    72 
    73     /*
    74      * Set up for the libc handling.
    75      */
    76 
    77     if (BSP_Configuration.ticks_per_timeslice > 0)
    78         libc_init(1);                /* reentrant if possible */
    79     else
    80         libc_init(0);                /* non-reentrant */
    81 }
     48 
     49void bsp_postdriver_hook(void);
     50void bsp_libc_init( void *, unsigned32, int );
    8251
    8352/*
     
    9564 */
    9665 
    97 void
    98 bsp_pretasking_hook(void)
     66void bsp_pretasking_hook(void)
    9967{
    100     bsp_libc_init();
     68    extern int end;
     69    rtems_unsigned32        heap_start;
     70
     71    heap_start = (rtems_unsigned32) &end;
     72    if (heap_start & (CPU_ALIGNMENT-1))
     73        heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
     74
     75    bsp_libc_init((void *) heap_start, 64 * 1024, 0);
    10176 
    10277#ifdef RTEMS_DEBUG
     
    10479#endif
    10580}
    106  
    10781
    10882/*
    109  *  Use the shared bsp_postdriver_hook() implementation
     83 *  bsp_start
     84 *
     85 *  This routine does the bulk of the system initialization.
    11086 */
    111  
    112 void bsp_postdriver_hook(void);
    113 
    11487
    11588void bsp_start( void )
  • c/src/lib/libbsp/m68k/ods68302/startup/Makefile.in

    rb3d3a34e rb6394ae  
    1313# C source names, if any, go here -- minus the .c
    1414C_PIECES=crc debugport gdb-hooks main m68302scc m68k-stub memcheck trace \
    15                 bsppost bspstart bspclean sbrk setvec
     15                bsplibc bsppost bspstart bspclean sbrk setvec
    1616C_FILES=$(C_PIECES:%=%.c)
    1717C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c

    rb3d3a34e rb6394ae  
    1 /*  bsp_start()
    2  *
     1/*
    32 *  This routine starts the application.  It includes application,
    43 *  board, and monitor specific initialization and configuration.
    54 *  The generic CPU dependent initialization has been performed
    65 *  before this routine is invoked.
    7  *
    8  *  INPUT:  NONE
    9  *
    10  *  OUTPUT: NONE
    116 *
    127 *  COPYRIGHT (c) 1989-1998.
     
    4136char *rtems_progname;
    4237
    43 /*      Initialize whatever libc we are using
    44  *      called from postdriver hook
     38/*
     39 *  Use the shared implementations of the following routines
    4540 */
    46 
    47 void bsp_libc_init()
    48 {
    49     extern int end;
    50     rtems_unsigned32        heap_start;
    51 
    52     heap_start = (rtems_unsigned32) &end;
    53     if (heap_start & (CPU_ALIGNMENT-1))
    54         heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
    55 
    56     /*
    57      *  The last parameter to RTEMS_Malloc_Initialize is the "chunk"
    58      *  size which a multiple of will be requested on each sbrk()
    59      *  call by malloc().  A value of 0 indicates that sbrk() should
    60      *  not be called to extend the heap.
    61      */
    62 
    63     RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
    64 
    65     /*
    66      *  Init the RTEMS libio facility to provide UNIX-like system
    67      *  calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
    68      *  Uses malloc() to get area for the iops, so must be after malloc init
    69      */
    70 
    71     rtems_libio_init();
    72 
    73     /*
    74      * Set up for the libc handling.
    75      */
    76 
    77     if (BSP_Configuration.ticks_per_timeslice > 0)
    78         libc_init(1);                /* reentrant if possible */
    79     else
    80         libc_init(0);                /* non-reentrant */
    81 }
     41 
     42void bsp_postdriver_hook(void);
     43void bsp_libc_init( void *, unsigned32, int );
    8244
    8345/*
     
    9557 */
    9658 
    97 void
    98 bsp_pretasking_hook(void)
     59void bsp_pretasking_hook(void)
    9960{
    100     bsp_libc_init();
     61    extern int end;
     62    rtems_unsigned32        heap_start;
     63
     64    heap_start = (rtems_unsigned32) &end;
     65    if (heap_start & (CPU_ALIGNMENT-1))
     66        heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
     67
     68    bsp_libc_init((void *) heap_start, 64 * 1024, 0);
    10169 
    10270#ifdef RTEMS_DEBUG
     
    10573}
    10674 
    107 
    10875/*
    109  *  Use the shared bsp_postdriver_hook() implementation
     76 *  bsp_start
     77 *
     78 *  This routine does the bulk of the system initialization.
    11079 */
    111  
    112 void bsp_postdriver_hook(void);
    11380
    11481void bsp_start( void )
Note: See TracChangeset for help on using the changeset viewer.