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


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/dmv152/startup
Files:
2 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 )
Note: See TracChangeset for help on using the changeset viewer.