Ignore:
Timestamp:
Apr 15, 1998, 3:13:01 PM (23 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/idp/startup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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 )
Note: See TracChangeset for help on using the changeset viewer.