diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-19 19:45:18 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-19 19:45:18 +0000 |
commit | 387a69a10e446a018b97d8cb1f00606ef4c5072d (patch) | |
tree | da81e7610eedb82d1c96cddb188b2d76355c9399 /c/src/lib/libbsp/powerpc/score603e/startup | |
parent | 2008-09-19 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-387a69a10e446a018b97d8cb1f00606ef4c5072d.tar.bz2 |
2008-09-19 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, include/bsp.h, startup/bspstart.c, startup/linkcmds: Use
PowerPC level shared bsp_get_work_area() implementation.
* startup/bspgetworkarea.c: Removed.
Diffstat (limited to 'c/src/lib/libbsp/powerpc/score603e/startup')
-rw-r--r-- | c/src/lib/libbsp/powerpc/score603e/startup/bspgetworkarea.c | 44 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c | 8 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/score603e/startup/linkcmds | 3 |
3 files changed, 11 insertions, 44 deletions
diff --git a/c/src/lib/libbsp/powerpc/score603e/startup/bspgetworkarea.c b/c/src/lib/libbsp/powerpc/score603e/startup/bspgetworkarea.c deleted file mode 100644 index a30866ebf3..0000000000 --- a/c/src/lib/libbsp/powerpc/score603e/startup/bspgetworkarea.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include <bsp.h> -#include <bsp/bootcard.h> -#include <stdint.h> - -extern void *RAM_END; -extern void *__rtems_end; -extern uint32_t _bsp_sbrk_init(uint32_t, uint32_t*); - -unsigned int BSP_mem_size = (unsigned int)&RAM_END; - -/* - * This method returns the base address and size of the area which - * is to be allocated between the RTEMS Workspace and the C Program - * Heap. - */ -void bsp_get_work_area( - void **work_area_start, - size_t *work_area_size, - void **heap_start, - size_t *heap_size -) -{ - uintptr_t size; - uintptr_t reserve; - - reserve = (uintptr_t)BSP_INIT_STACK_SIZE; - reserve += rtems_configuration_get_interrupt_stack_size(); - size = (uintptr_t)&RAM_END - (uintptr_t)&__rtems_end + reserve; - - *work_area_start = (void *)(&__rtems_end + reserve); - *work_area_size = size; - _bsp_sbrk_init( *work_area_start, work_area_size ); - *heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA; - *heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT; -} - diff --git a/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c b/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c index 24a5b0aadb..e6c70a8fba 100644 --- a/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c @@ -29,6 +29,12 @@ unsigned int BSP_heap_start; /* + * Total RAM available and associated linker symbol + */ +unsigned int BSP_mem_size; +extern char RamSize[]; + +/* * PCI Bus Frequency */ unsigned int BSP_bus_frequency; /* XXX - Set this based upon the Score board */ @@ -266,7 +272,9 @@ void bsp_start( void ) */ intrStackStart = (uint32_t) __rtems_end + BSP_INIT_STACK_SIZE; intrStackSize = rtems_configuration_get_interrupt_stack_size(); + BSP_heap_start = intrStackStart + intrStackSize; + BSP_mem_size = (uintptr_t) RamSize; /* * Initialize default raw exception handlers. diff --git a/c/src/lib/libbsp/powerpc/score603e/startup/linkcmds b/c/src/lib/libbsp/powerpc/score603e/startup/linkcmds index 37f247c4aa..0b2a9f2073 100644 --- a/c/src/lib/libbsp/powerpc/score603e/startup/linkcmds +++ b/c/src/lib/libbsp/powerpc/score603e/startup/linkcmds @@ -12,6 +12,9 @@ ENTRY(_start) PROVIDE(CPU_PPC_CLICKS_PER_MS = 16500); +RamBase = DEFINED(RamBase) ? RamBase : 0x0; +RamSize = DEFINED(RamSize) ? RamSize : 31M; + MEMORY { VECTORS : ORIGIN = 0, LENGTH = 64K |