Changeset 6f4aa47 in rtems


Ignore:
Timestamp:
Sep 14, 2008, 9:57:13 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
eb3923b
Parents:
a444be6
Message:

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

  • Makefile.am, startup/bspstart.c: Create bsp_get_work_area() into its own file and use BSP Framework to perform more initialization.
  • startup/bspgetworkarea.c: New file.
Location:
c/src/lib/libbsp/nios2/nios2_iss
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/nios2/nios2_iss/ChangeLog

    ra444be6 r6f4aa47  
     12008-09-14      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * Makefile.am, startup/bspstart.c: Create bsp_get_work_area() into its
     4        own file and use BSP Framework to perform more initialization.
     5        * startup/bspgetworkarea.c: New file.
     6
    172008-09-10      Joel Sherrill <joel.sherrill@oarcorp.com>
    28
  • c/src/lib/libbsp/nios2/nios2_iss/Makefile.am

    ra444be6 r6f4aa47  
    3232startup_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \
    3333    ../../shared/bsppost.c startup/bspstart.c \
     34    ../../shared/bsppretaskinghook.c startup/bspgetworkarea.c \
    3435    ../../shared/bootcard.c ../../shared/sbrk.c startup/setvec.c \
    3536    ../../shared/gnatinstallhandler.c
  • c/src/lib/libbsp/nios2/nios2_iss/startup/bspstart.c

    ra444be6 r6f4aa47  
    2020
    2121#include <bsp.h>
    22 #include <rtems/libio.h>
    23 #include <rtems/libcsupport.h>
    24 
    25 /*
    26  *  Use the shared implementations of the following routines
    27  */
    28 
    29 extern void bsp_libc_init( void *, uint32_t, int );
    30 
    31 #if 0
    32 extern char         _RAMBase[];
    33 extern char         _RAMSize[];
    34 extern char         _WorkspaceBase[];
    35 extern char         _HeapSize[];
    36 #else
    37 extern char __alt_heap_start[];
    38 #endif
    39 
    40 /*
    41  *  Function:   bsp_pretasking_hook
    42  *  Created:    95/03/10
    43  *
    44  *  Description:
    45  *      BSP pretasking hook.  Called just before drivers are initialized.
    46  *      Used to setup libc and install any BSP extensions.
    47  *
    48  *  NOTES:
    49  *      Must not use libc (to do io) from here, since drivers are
    50  *      not yet initialized.
    51  *
    52  */
    53 
    54 void bsp_pretasking_hook(void)
    55 {
    56     unsigned long heapStart;
    57     unsigned long ramSpace;
    58 
    59     heapStart = (unsigned long)Configuration.work_space_start
    60               + rtems_configuration_get_work_space_size();
    61 
    62     if (heapStart & (CPU_ALIGNMENT-1))
    63         heapStart = (heapStart + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
    64 
    65     ramSpace = RAM_BASE + RAM_BYTES - heapStart;
    66 
    67     /* TODO */
    68     ramSpace -= 16384; /* Space for initial stack, not to be zeroed */
    69 
    70     bsp_libc_init((void *)heapStart, ramSpace, 0);
    71 }
    7222
    7323/*
     
    7929void bsp_start( void )
    8030{
    81   /*
    82    *  Need to "allocate" the memory for the RTEMS Workspace and
    83    *  tell the RTEMS configuration where it is.  This memory is
    84    *  not malloc'ed.  It is just "pulled from the air".
    85    */
    86 
    87 #if 0
    88   Configuration.work_space_start = (void *)_WorkspaceBase;
    89 #else
    90   Configuration.work_space_start = (void *)__alt_heap_start;
    91 #endif
    92 
    9331}
Note: See TracChangeset for help on using the changeset viewer.