diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-15 22:05:12 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-15 22:05:12 +0000 |
commit | 8446486f60a16bd60d793ad61d3cc2a9f9a4fc8a (patch) | |
tree | a09cf995ff8e58b08841f391bba1ee5cd4252486 /c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c | |
parent | 2008-09-15 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-8446486f60a16bd60d793ad61d3cc2a9f9a4fc8a.tar.bz2 |
2008-09-15 Joel Sherrill <joel.sherrill@oarcorp.com>
* 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.
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c | 70 |
1 files changed, 1 insertions, 69 deletions
diff --git a/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c b/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c index 8bd9539669..b343a3a6f4 100644 --- a/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c @@ -18,8 +18,6 @@ #include <string.h> #include <bsp.h> -#include <rtems/libio.h> -#include <rtems/libcsupport.h> #include <rtems/bspIo.h> #include <libcpu/cpuIdent.h> #define DEBUG 1 @@ -44,14 +42,8 @@ unsigned int BSP_processor_frequency; /* XXX - Set this based upon the Score boa */ unsigned int BSP_time_base_divisor = 1000; /* XXX - Just a guess */ -/* - * system init stack - */ -#define INIT_STACK_SIZE 0x1000 - extern unsigned long __rtems_end[]; - /* * Driver configuration parameters */ @@ -70,47 +62,6 @@ void _BSP_Fatal_error(unsigned int v) } /* - * Use the shared implementations of the following routines - */ - -void bsp_postdriver_hook(void); -void bsp_libc_init( void *, uint32_t, int ); - -/*PAGE - * - * bsp_pretasking_hook - * - * BSP pretasking hook. Called just before drivers are initialized. - * Used to setup libc and install any BSP extensions. - */ - -void bsp_pretasking_hook(void) -{ - extern int end; - uint32_t heap_start; - uint32_t heap_size; - - #if DEBUG - printk("bsp_pretasking_hook: Set Heap\n"); - #endif - heap_start = (uint32_t) &end; - if (heap_start & (CPU_ALIGNMENT-1)) - heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1); - - heap_size = Configuration.work_space_start - (void *)&end; - heap_size &= 0xfffffff0; /* keep it as a multiple of 16 bytes */ - - #if DEBUG - printk("bsp_pretasking_hook: bsp_libc_init\n"); - #endif - bsp_libc_init((void *) heap_start, heap_size, 0); - #if DEBUG - printk("bsp_pretasking_hook: End of routine\n"); - #endif -} - -/*PAGE - * * bsp_predriver_hook * * Before drivers are setup initialize interupt vectors. @@ -312,7 +263,7 @@ void bsp_start( void ) /* * Initialize the interrupt related settings. */ - intrStackStart = (uint32_t) __rtems_end + INIT_STACK_SIZE; + intrStackStart = (uint32_t) __rtems_end + BSP_INIT_STACK_SIZE; intrStackSize = rtems_configuration_get_interrupt_stack_size(); BSP_heap_start = intrStackStart + intrStackSize; @@ -392,25 +343,6 @@ printk("ppc_exc_initialize\n"); _CPU_MSR_SET( msr_value ); /* - * Need to "allocate" the memory for the RTEMS Workspace and - * tell the RTEMS configuration where it is. This memory is - * not malloc'ed. It is just "pulled from the air". - */ - - #if DEBUG - printk("bsp_start: Calculate Wrokspace\n"); - #endif - work_space_start = - (unsigned char *)&RAM_END - rtems_configuration_get_work_space_size(); - - if ( work_space_start <= (unsigned char *)&end ) { - printk( "bspstart: Not enough RAM!!!\n" ); - bsp_cleanup(); - } - - Configuration.work_space_start = work_space_start; - - /* * initialize the device driver parameters */ #if DEBUG |