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


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/ods68302/startup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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.