Changeset 8446486f in rtems


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

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

  • Makefile.am, configure.ac, include/bsp.h, startup/bspstart.c: 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/score603e
Files:
1 added
5 edited

Legend:

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

    r60e3b00 r8446486f  
     12008-09-15      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * Makefile.am, configure.ac, include/bsp.h, startup/bspstart.c: Add use
     4        of bsp_get_work_area() in its own file and rely on 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/score603e/Makefile.am

    r60e3b00 r8446486f  
    2727
    2828startup_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \
    29     startup/bspstart.c ../../shared/bootcard.c \
    30     ../../shared/sbrk.c startup/Hwr_init.c \
     29    startup/bspstart.c startup/bspgetworkarea.c ../../shared/bootcard.c \
     30    startup/Hwr_init.c ../../powerpc/shared/startup/sbrk.c \
    3131    startup/genpvec.c ../../shared/gnatinstallhandler.c \
    32     ../../powerpc/shared/showbats.c
     32    ../../powerpc/shared/showbats.c \
     33    ../../shared/bsppretaskinghook.c
    3334
    3435pclock_SOURCES = ../../powerpc/shared/clock/p_clock.c
  • c/src/lib/libbsp/powerpc/score603e/configure.ac

    r60e3b00 r8446486f  
    7070AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
    7171
     72RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION
     73
    7274# Explicitly list all Makefiles here
    7375AC_CONFIG_FILES([Makefile])
  • c/src/lib/libbsp/powerpc/score603e/include/bsp.h

    r60e3b00 r8446486f  
    9898 */
    9999
    100 extern int   RAM_START;
    101 extern int   RAM_END;
    102 extern int   RAM_SIZE;
    103 
    104 extern int   PROM_START;
    105 extern int   PROM_END;
    106 extern int   PROM_SIZE;
     100extern void *RAM_END;
     101extern void *end;
    107102
    108103extern int   CLOCK_SPEED;
    109104extern int   CPU_PPC_CLICKS_PER_MS;
    110105
    111 extern int   end;        /* last address in the program */
     106/*
     107 * system init stack
     108 */
     109#define BSP_INIT_STACK_SIZE 0x1000
    112110
    113111/*
  • c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c

    r60e3b00 r8446486f  
    1919
    2020#include <bsp.h>
    21 #include <rtems/libio.h>
    22 #include <rtems/libcsupport.h>
    2321#include <rtems/bspIo.h>
    2422#include <libcpu/cpuIdent.h>
     
    4543unsigned int BSP_time_base_divisor = 1000;  /* XXX - Just a guess */
    4644
    47 /*
    48  * system init stack
    49  */
    50 #define INIT_STACK_SIZE 0x1000
    51 
    5245extern unsigned long __rtems_end[];
    53 
    5446
    5547/*
     
    7163
    7264/*
    73  *  Use the shared implementations of the following routines
    74  */
    75 
    76 void bsp_postdriver_hook(void);
    77 void bsp_libc_init( void *, uint32_t, int );
    78 
    79 /*PAGE
    80  *
    81  *  bsp_pretasking_hook
    82  *
    83  *  BSP pretasking hook.  Called just before drivers are initialized.
    84  *  Used to setup libc and install any BSP extensions.
    85  */
    86 
    87 void bsp_pretasking_hook(void)
    88 {
    89   extern int end;
    90   uint32_t         heap_start;
    91   uint32_t         heap_size;
    92 
    93   #if DEBUG
    94     printk("bsp_pretasking_hook: Set Heap\n");
    95   #endif
    96   heap_start = (uint32_t) &end;
    97   if (heap_start & (CPU_ALIGNMENT-1))
    98     heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
    99 
    100   heap_size = Configuration.work_space_start - (void *)&end;
    101   heap_size &= 0xfffffff0;  /* keep it as a multiple of 16 bytes */
    102 
    103   #if DEBUG
    104     printk("bsp_pretasking_hook: bsp_libc_init\n");
    105   #endif
    106   bsp_libc_init((void *) heap_start, heap_size, 0);
    107   #if DEBUG
    108     printk("bsp_pretasking_hook: End of routine\n");
    109   #endif
    110 }
    111 
    112 /*PAGE
    113  *
    11465 *  bsp_predriver_hook
    11566 *
     
    313264   * Initialize the interrupt related settings.
    314265   */
    315   intrStackStart = (uint32_t) __rtems_end + INIT_STACK_SIZE;
     266  intrStackStart = (uint32_t) __rtems_end + BSP_INIT_STACK_SIZE;
    316267  intrStackSize = rtems_configuration_get_interrupt_stack_size();
    317268  BSP_heap_start = intrStackStart + intrStackSize;
     
    393344
    394345  /*
    395    *  Need to "allocate" the memory for the RTEMS Workspace and
    396    *  tell the RTEMS configuration where it is.  This memory is
    397    *  not malloc'ed.  It is just "pulled from the air".
    398    */
    399 
    400   #if DEBUG
    401     printk("bsp_start: Calculate Wrokspace\n");
    402   #endif
    403   work_space_start =
    404     (unsigned char *)&RAM_END - rtems_configuration_get_work_space_size();
    405 
    406   if ( work_space_start <= (unsigned char *)&end ) {
    407     printk( "bspstart: Not enough RAM!!!\n" );
    408     bsp_cleanup();
    409   }
    410 
    411   Configuration.work_space_start = work_space_start;
    412 
    413   /*
    414346   *  initialize the device driver parameters
    415347   */
Note: See TracChangeset for help on using the changeset viewer.