Changeset f1359069 in rtems


Ignore:
Timestamp:
Sep 15, 2008, 10:05:16 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
db77b92
Parents:
0f707111
Message:

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

  • Makefile.am, configure.ac, include/bsp.h, include/bspopts.h.in, startup/bspstart.c, startup/linkcmds: Add use of bsp_get_work_area() in its own file and rely on BSP Framework to perform more initialization.
  • startup/bspgetworkarea.c: New file.
Location:
c/src/lib/libbsp/powerpc/virtex
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/virtex/ChangeLog

    r0f707111 rf1359069  
     12008-09-15      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * Makefile.am, configure.ac, include/bsp.h, include/bspopts.h.in,
     4        startup/bspstart.c, startup/linkcmds: Add use of bsp_get_work_area()
     5        in its own file and rely on BSP Framework to perform more
     6        initialization.
     7        * startup/bspgetworkarea.c: New file.
     8
    192008-09-06      Ralf Corsépius <ralf.corsepius@rtems.org>
    210
  • c/src/lib/libbsp/powerpc/virtex/Makefile.am

    r0f707111 rf1359069  
    3333dist_project_lib_DATA += startup/linkcmds
    3434
    35 startup_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \
     35startup_SOURCES = startup/bspclean.c startup/bspgetworkarea.c \
     36    ../../shared/bsplibc.c \
    3637    ../../shared/bsppost.c startup/bspstart.c ../../shared/bootcard.c \
    37     ../../shared/bsppredriverhook.c \
     38    ../../shared/bsppredriverhook.c ../../shared/bsppretaskinghook.c \
    3839    ../../shared/sbrk.c startup/setvec.c \
    3940    ../../shared/gnatinstallhandler.c
  • c/src/lib/libbsp/powerpc/virtex/configure.ac

    r0f707111 rf1359069  
    4242#RSG End
    4343
     44RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION
     45
    4446# Explicitly list all Makefiles here
    4547AC_CONFIG_FILES([Makefile])
  • c/src/lib/libbsp/powerpc/virtex/include/bsp.h

    r0f707111 rf1359069  
    6363#include <bsp/vectors.h>
    6464
    65 /* Constants */
    66 
    67 extern uint32_t _HeapSize;
    68 extern uint32_t _heap_start;
    69 extern uint32_t _heap_end;
    70 extern uint32_t _top_of_ram;
    71 
    7265/* miscellaneous stuff assumed to exist */
    7366
  • c/src/lib/libbsp/powerpc/virtex/include/bspopts.h.in

    r0f707111 rf1359069  
    11/* include/bspopts.h.in.  Generated from configure.ac by autoheader.  */
     2
     3/* BSP uses shared logic in bootcard.c */
     4#undef BSP_BOOTCARD_HANDLES_RAM_ALLOCATION
     5
     6/* If defined, then PSIM will put a non-zero pattern into the RTEMS Workspace
     7   and C program heap. This should assist in finding code that assumes memory
     8   starts set to zero. */
     9#undef BSP_DIRTY_MEMORY
    210
    311/* Define to the address where bug reports for this package should be sent. */
  • c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c

    r0f707111 rf1359069  
    6161
    6262#include <bsp.h>
    63 #include <rtems/libio.h>
    64 #include <rtems/libcsupport.h>
    6563#include <bsp/irq.h>
    6664#include <rtems/bspIo.h>
     
    9593
    9694void bsp_XAssertHandler(const char* file, int line);
    97 void bsp_libc_init( void *, uint32_t, int );
    98 
    9995
    10096void bsp_XAssertHandler(const char* file, int line) {
    10197  printf("\n***\n*** XAssert Failed!  File: %s, Line: %d\n***\n", file, line);
    102 }
    103 
    104 /*
    105  *  Function:   bsp_pretasking_hook
    106  *  Created:    95/03/10
    107  *
    108  *  Description:
    109  *      BSP pretasking hook.  Called just before drivers are initialized.
    110  *      Used to setup libc and install any BSP extensions.
    111  *
    112  *  NOTES:
    113  *      Must not use libc (to do io) from here, since drivers are
    114  *      not yet initialized.
    115  *
    116  */
    117 
    118 void bsp_pretasking_hook(void)
    119 {
    120 
    121 
    122     uint32_t        heap_start;
    123     uint32_t        heap_size;
    124     uint32_t        heap_end;
    125 
    126     /* round up from the top of workspace to next 64k boundary, get
    127      * default heapsize from linker script  */
    128     heap_start = (((uint32_t)Configuration.work_space_start +
    129                    rtems_configuration_get_work_space_size()) + 0x18000) & 0xffff0000;
    130 
    131     heap_end = _heap_start + (uint32_t)&_HeapSize;
    132 
    133     heap_size = (heap_end - heap_start);
    134 
    135     _heap_start = heap_start;
    136     _heap_end = heap_end;
    137 
    138     _top_of_ram = heap_end;
    139 
    140     bsp_libc_init((void *) heap_start, heap_size, 0); /* 64 * 1024 */
    141 
    14298}
    14399
     
    147103 *  This routine does the bulk of the system initialization.
    148104 */
    149 
    150 
    151105void bsp_start( void )
    152106{
     
    192146   */
    193147  BSP_rtems_irq_mng_init(0);
    194 
    195   /*
    196    *  Allocate the memory for the RTEMS Work Space.  This can come from
    197    *  a variety of places: hard coded address, malloc'ed from outside
    198    *  RTEMS world (e.g. simulator or primitive memory manager), or (as
    199    *  typically done by stock BSPs) by subtracting the required amount
    200    *  of work space from the last physical address on the CPU board.
    201    */
    202 
    203   /*
    204    *  Need to "allocate" the memory for the RTEMS Workspace and
    205    *  tell the RTEMS configuration where it is.  This memory is
    206    *  not malloc'ed.  It is just "pulled from the air".
    207    */
    208   /* FIME: plan usage of RAM better:
    209      - make top of ram dynamic,
    210      - make rest of ram to heap...
    211      -remove RAM_END from bsp.h, this cannot be valid...
    212       or must be a function call
    213    */
    214   {
    215     extern int _end;
    216 
    217     /* round _end up to next 64k boundary for start of workspace */
    218     Configuration.work_space_start = (void *)((((uint32_t)&_end) + 0xffff) & 0xffff0000);
    219   }
    220 
    221148}
    222149
  • c/src/lib/libbsp/powerpc/virtex/startup/linkcmds

    r0f707111 rf1359069  
    1818
    1919
    20 _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 8M;
    21 
     20RamBase = DEFINED(RamBase) ? RamBase : 0x0;
     21RamSize = DEFINED(RamSize) ? RamSize : 128M;
    2222
    2323MEMORY
    24   {
    25         RAM : ORIGIN = 0, LENGTH = 128M
    26         /*FLASH : ORIGIN = 0xFFE00000, LENGTH = 16M*/
    27   }
     24{
     25  RAM : ORIGIN = 0, LENGTH = 128M
     26  /*FLASH : ORIGIN = 0xFFE00000, LENGTH = 16M*/
     27}
    2828SECTIONS
    2929{
     
    248248 
    249249    PROVIDE(_end = . );
     250    WorkSpaceStart = .;
    250251
    251252
Note: See TracChangeset for help on using the changeset viewer.