Changeset 63c08c0 in rtems


Ignore:
Timestamp:
Sep 14, 2008, 9:34:26 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
6a39cd4
Parents:
58eee41
Message:

2008-09-14 Joel Sherrill <joel.sherrill@…>

  • Makefile.am, configure.ac, startup/bspstart.c: Split out bsp_get_work_area() into its own file and user BSP Framework to perform more initialization.
  • startup/bspgetworkarea.c: New file.
Location:
c/src/lib/libbsp/mips/hurricane
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/mips/hurricane/ChangeLog

    r58eee41 r63c08c0  
     12008-09-14      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * Makefile.am, configure.ac, startup/bspstart.c: Split out
     4        bsp_get_work_area() into its own file and user BSP Framework to
     5        perform more initialization.
     6        * startup/bspgetworkarea.c: New file.
     7
    182008-09-05      Joel Sherrill <joel.sherrill@OARcorp.com>
    29
  • c/src/lib/libbsp/mips/hurricane/Makefile.am

    r58eee41 r63c08c0  
    3131startup_SOURCES = ../../shared/bspclean.c \
    3232    ../../shared/bsplibc.c ../../shared/bsppost.c \
     33   ../../shared/bsppretaskinghook.c startup/bspgetworkarea.c \
    3334    ../../shared/bsppredriverhook.c startup/bspstart.c \
    3435    ../../shared/bootcard.c ../../shared/sbrk.c \
  • c/src/lib/libbsp/mips/hurricane/configure.ac

    r58eee41 r63c08c0  
    1717RTEMS_PROG_CCAS
    1818
     19RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION
     20
    1921# Explicitly list all Makefiles here
    2022AC_CONFIG_FILES([Makefile])
  • c/src/lib/libbsp/mips/hurricane/startup/bspstart.c

    r58eee41 r63c08c0  
    2424 
    2525/*
    26  *  Use the shared implementations of the following routines
    27  */
    28  
    29 void bsp_libc_init( void *, uint32_t, int );
    30 
    31 void init_exc_vecs(void);
    32 
    33 /*
    34  *  Function:   bsp_pretasking_hook
    35  *  Created:    95/03/10
    36  *
    37  *  Description:
    38  *      BSP pretasking hook.  Called just before drivers are initialized.
    39  *      Used to setup libc and install any BSP extensions.
    40  *
    41  *  NOTES:
    42  *      Must not use libc (to do io) from here, since drivers are
    43  *      not yet initialized.
    44  *
    45  */
    46  
    47 #define LIBC_HEAP_SIZE (64 * 1024)
    48 
    49 void bsp_pretasking_hook(void)
    50 {
    51     extern int end;
    52     uint32_t heap_start;
    53 
    54     heap_start = (uint32_t) &end;
    55     if (heap_start & (CPU_ALIGNMENT-1))
    56         heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
    57 
    58     bsp_libc_init((void *) heap_start, LIBC_HEAP_SIZE, 0);
    59 }
    60  
    61 extern int end; /* defined by linker */
    62 
    63 /*
    6426 *  bsp_start
    6527 *
    6628 *  This routine does the bulk of the system initialization.
    6729 */
    68 
    6930void bsp_start( void )
    7031{
    71   /*
    72    *  Allocate the memory for the RTEMS Work Space.  This can come from
    73    *  a variety of places: hard coded address, malloc'ed from outside
    74    *  RTEMS world (e.g. simulator or primitive memory manager), or (as
    75    *  typically done by stock BSPs) by subtracting the required amount
    76    *  of work space from the last physical address on the CPU board.
    77    */
    78 
    79   /*
    80    *  Need to "allocate" the memory for the RTEMS Workspace and
    81    *  tell the RTEMS configuration where it is.  This memory is
    82    *  not malloc'ed.  It is just "pulled from the air".
    83    */
    84 
    85   Configuration.work_space_start =
    86        (void *)((uint64_t)((&end) + LIBC_HEAP_SIZE + 0x2000) & ~0x7);
    8732
    8833  bsp_clicks_per_microsecond = CPU_CLOCK_RATE_MHZ;
Note: See TracChangeset for help on using the changeset viewer.