2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>

* Makefile.am, startup/linkcmds: Use top level shared
	bsp_get_work_area() implementation.
	* startup/bspgetworkarea.c: Removed.
This commit is contained in:
Joel Sherrill
2008-09-16 22:16:46 +00:00
parent 85e3716398
commit e150cdbfe4
4 changed files with 14 additions and 47 deletions

View File

@@ -1,3 +1,9 @@
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, startup/linkcmds: Use top level shared
bsp_get_work_area() implementation.
* startup/bspgetworkarea.c: Removed.
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* startup/bspstart.c: Remove unnecessary includes of

View File

@@ -27,7 +27,7 @@ dist_project_lib_DATA += startup/linkcmds
startup_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \
../../shared/bsppredriverhook.c ../../shared/bsppost.c \
../../shared/bsppretaskinghook.c startup/bspgetworkarea.c \
../../shared/bsppretaskinghook.c ../../shared/bspgetworkarea.c \
startup/bspstart.c ../../shared/bootcard.c ../../shared/sbrk.c \
../../shared/gnatinstallhandler.c ../../shared/setvec.c
clock_SOURCES = clock/clockdrv.c

View File

@@ -1,43 +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 *_sdram_size;
extern void *_sdram_base;
extern void *_bss_free_start;
/*
* 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;
/*
* Old code had hard-coded heap size of 0x20000 and a comment indicating
* something about the undefined symbol MEM_NOCACHE_SIZE.
*/
size = (uintptr_t)&_sdram_base + (uintptr_t)&_sdram_size
- (uintptr_t)&_bss_free_start;
*work_area_start = (void *)&_bss_free_start;
*work_area_size = size;
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
*heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
}

View File

@@ -10,11 +10,15 @@
* Declare some sizes.
*/
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x4000;
_sdram_base = DEFINED(_sdram_base) ? _sdram_base : 0x80400000;
_sdram_size = DEFINED(_sdram_size) ? _sdram_size : 12M;
/* standard items provided by RTEMS linkcmds files */
RamBase = _sdram_base;
RamSize = _sdram_size;
HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x4000;
MEMORY
{
@@ -170,7 +174,7 @@ SECTIONS
end = .;
_end = .;
. = ALIGN (1024);
_bss_free_start = .;
WorkAreaBase = .;
} >ram