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:48:21 +00:00
parent 03f1297675
commit 2bd510395b
8 changed files with 22 additions and 82 deletions
+6
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
+1 -1
View File
@@ -28,7 +28,7 @@ project_lib_DATA = start.$(OBJEXT)
dist_project_lib_DATA += startup/linkcmds
startup_SOURCES = ../../shared/bspclean.c ../../shared/bsppredriverhook.c \
../../shared/bsppretaskinghook.c startup/bspgetworkarea.c \
../../shared/bsppretaskinghook.c ../../shared/bspgetworkarea.c \
../../shared/bsplibc.c ../../shared/bsppost.c startup/bspstart.c \
../../shared/bootcard.c ../../shared/sbrk.c \
../../shared/gnatinstallhandler.c ../../shared/setvec.c \
@@ -1,38 +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 *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;
size = (uintptr_t)&_RamBase + (uintptr_t)&_RamSize - (uintptr_t)&end;
*work_area_start = (void *)&end;
*work_area_size = size;
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
*heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
}
@@ -6,8 +6,9 @@
/*
* Declare some sizes.
*/
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x80000000;
_RamSize = DEFINED(_RamSize) ? _RamSize : 4M;
RamBase = DEFINED(RamBase) ? RamBase : 0x80000000;
RamSize = DEFINED(RamSize) ? RamSize : 4M;
HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
SECTIONS
@@ -148,6 +149,7 @@ SECTIONS
_stack_init = .;
end = .;
_end = .;
WorkAreaBase = .;
}
+6
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
+1 -1
View File
@@ -28,7 +28,7 @@ project_lib_DATA = start.$(OBJEXT)
dist_project_lib_DATA += startup/linkcmds
startup_SOURCES = ../../shared/bspclean.c ../../shared/bsppredriverhook.c \
../../shared/bsppretaskinghook.c startup/bspgetworkarea.c \
../../shared/bsppretaskinghook.c ../../shared/bspgetworkarea.c \
../../shared/bsplibc.c ../../shared/bsppost.c startup/bspstart.c \
../../shared/bootcard.c ../../shared/sbrk.c \
../../shared/gnatinstallhandler.c ../../shared/setvec.c \
@@ -1,38 +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 *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;
size = (uintptr_t)&_RamBase + (uintptr_t)&_RamSize - (uintptr_t)&end;
*work_area_start = (void *)&end;
*work_area_size = size;
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
*heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
}
@@ -6,8 +6,9 @@
/*
* Declare some sizes.
*/
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x80000000;
_RamSize = DEFINED(_RamSize) ? _RamSize : 4M;
RamBase = DEFINED(RamBase) ? RamBase : 0x80000000;
RamSize = DEFINED(RamSize) ? RamSize : 4M;
HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
SECTIONS
@@ -148,6 +149,7 @@ SECTIONS
_stack_init = .;
end = .;
_end = .;
WorkAreaBase = .;
}