Changeset b4a52b1 in rtems


Ignore:
Timestamp:
Sep 14, 2008, 11:43:36 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
28b6765d
Parents:
c4515a1
Message:

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

  • Makefile.am, configure.ac, startup/bspstart.c, startup/linkcmds: 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/powerpc/mbx8xx
Files:
1 added
5 edited

Legend:

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

    rc4515a1 rb4a52b1  
     12008-09-14      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * Makefile.am, configure.ac, startup/bspstart.c, startup/linkcmds:
     4        Create bsp_get_work_area() into its own file and use BSP Framework to
     5        perform more initialization.
     6        * startup/bspgetworkarea.c: New file.
     7
    182008-09-10      Joel Sherrill <joel.sherrill@oarcorp.com>
    29
  • c/src/lib/libbsp/powerpc/mbx8xx/Makefile.am

    rc4515a1 rb4a52b1  
    3636startup_SOURCES = ../../shared/bspclean.c ../../shared/bsplibc.c \
    3737    ../../shared/bsppost.c ../../shared/bsppredriverhook.c \
     38    ../../shared/bsppretaskinghook.c startup/bspgetworkarea.c \
    3839    startup/bspstart.c ../../shared/bootcard.c \
    3940    startup/imbx8xx.c startup/mmutlbtab.c \
  • c/src/lib/libbsp/powerpc/mbx8xx/configure.ac

    rc4515a1 rb4a52b1  
    115115[used by irq/irq.c])
    116116
     117RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION
     118
    117119# Explicitly list a Makefile here
    118120AC_CONFIG_FILES([Makefile])
  • c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c

    rc4515a1 rb4a52b1  
    2626#include <bsp/irq.h>
    2727#include <rtems/libio.h>
    28 #include <rtems/libcsupport.h>
    2928#include <rtems/bspIo.h>
    3029#include <libcpu/cpuIdent.h>
     
    5049bool       bsp_timer_internal_clock;   /* TRUE, when timer runs with CPU clk */
    5150
    52 /*
    53  *  Use the shared implementations of the following routines.
    54  *  Look in rtems/c/src/lib/libbsp/shared/bsppost.c and
    55  *  rtems/c/src/lib/libbsp/shared/bsplibc.c.
    56  */
    57 void bsp_libc_init( void *, uint32_t, int );
    58 
    5951void BSP_panic(char *s)
    6052{
     
    6759  printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
    6860  __asm__ __volatile ("sc");
    69 }
    70 
    71 /*
    72  *  bsp_pretasking_hook
    73  *
    74  *  Called when RTEMS initialization is complete but before interrupts and
    75  *  tasking are enabled. Used to setup libc and install any BSP extensions.
    76  *
    77  *  Must not use libc (to do io) from here, since drivers are not yet
    78  *  initialized.
    79  *
    80  *  Input parameters: NONE
    81  *
    82  *  Output parameters: NONE
    83  *
    84  *  Return values: NONE
    85  */
    86 void bsp_pretasking_hook(void)
    87 {
    88   /*
    89    *  These are assigned addresses in the linkcmds file for the BSP. This
    90    *  approach is better than having these defined as manifest constants and
    91    *  compiled into the kernel, but it is still not ideal when dealing with
    92    *  multiprocessor configuration in which each board as a different memory
    93    *  map. A better place for defining these symbols might be the makefiles.
    94    *  Consideration should also be given to developing an approach in which
    95    *  the kernel and the application can be linked and burned into ROM
    96    *  independently of each other.
    97    */
    98   extern unsigned char _HeapStart;
    99   extern unsigned char _HeapEnd;
    100 
    101   bsp_libc_init( &_HeapStart, &_HeapEnd - &_HeapStart, 0 );
    10261}
    10362
     
    12887void bsp_start(void)
    12988{
    130   extern void *_WorkspaceBase;
    131 
    13289  ppc_cpu_id_t myCpu;
    13390  ppc_cpu_revision_t myCpuRevision;
     
    170127   */
    171128  initialize_exceptions();
    172 
    173   /*
    174    *  Allocate the memory for the RTEMS Work Space.  This can come from
    175    *  a variety of places: hard coded address, malloc'ed from outside
    176    *  RTEMS world (e.g. simulator or primitive memory manager), or (as
    177    *  typically done by stock BSPs) by subtracting the required amount
    178    *  of work space from the last physical address on the CPU board.
    179    *
    180    *  In this case, the memory is not malloc'ed.  It is just
    181    *  "pulled from the air".
    182    */
    183   Configuration.work_space_start = (void *)&_WorkspaceBase;
    184129
    185130  /*
  • c/src/lib/libbsp/powerpc/mbx8xx/startup/linkcmds

    rc4515a1 rb4a52b1  
    1616 *      the lines marked XXX below to use a constant value.
    1717 */
    18 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x100000;     /* 1M Heap */
    1918StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
     19RamBase = DEFINED(RamBase) ? RamBase : 0;
     20RamSize = DEFINED(RamSized) ? RamSize : 4M;
    2021 
    2122MEMORY
     
    263264  PROVIDE(intrStackPtr = intrStack);
    264265
    265   _HeapStart = .;
    266   __HeapStart = .;
    267   . += HeapSize;  /* XXX -- Old gld can't handle this */
    268   /* . += 0x80000; */ /* HeapSize for old gld */
    269   _HeapEnd = .;
    270   __HeapEnd = .;
    271   clear_end = .;
    272        
    273   _WorkspaceBase = .;
    274   __WorkspaceBase = .;
    275        
     266  WorkspaceBase = .;
     267
    276268  dpram :
    277269  {
Note: See TracChangeset for help on using the changeset viewer.