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 20:19:22 +00:00
parent 2d41fc5c52
commit 895321b7ee
4 changed files with 9 additions and 41 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>
* clock/clock.c, startup/bspstart.c, startup/linkcmds: Add use of

View File

@@ -32,7 +32,7 @@ project_lib_DATA = start.$(OBJEXT)
dist_project_lib_DATA += startup/linkcmds
startup_SOURCES = ../../shared/bspclean.c ../../shared/bsplibc.c \
../../shared/bsppredriverhook.c \
../../shared/bsppredriverhook.c ../../shared/bspgetworkarea.c \
../../shared/bsppost.c startup/bspstart.c \
../../shared/bootcard.c ../../shared/sbrk.c ../../shared/setvec.c \
../../c4x/shared/c3xspurious.c ../../c4x/shared/c4xspurious.c \

View File

@@ -1,39 +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 *RamBase;
extern void *RamSize;
extern void *WorkSpaceStart;
/*
* 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;
size = (uintptr_t)&RamBase + (uintptr_t)&RamSize
- (uintptr_t)&WorkSpaceStart;
*work_area_start = (void *)&WorkSpaceStart;
*work_area_size = size;
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
*heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
}

View File

@@ -4,6 +4,7 @@
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
_RamSize = DEFINED(_RamSize) ? _RamSize : 4M;
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
ENTRY(_start)
SECTIONS
@@ -65,7 +66,7 @@ SECTIONS
}
.heap :
{
_WorkspaceBase = .;
_WorkAreaBase = .;
}
/*
.sysmem :