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

* Makefile.am: Split out bsp_get_work_area() into its own file and user
	BSP Framework to perform more initialization. Let edb7312 and csb336
	shared the implementation.
	* startup/bspgetworkarea.c: Removed.
This commit is contained in:
Joel Sherrill
2008-09-12 20:25:34 +00:00
parent b7774253cf
commit 0729c2d928
3 changed files with 8 additions and 44 deletions
+7
View File
@@ -1,3 +1,10 @@
2008-09-12 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am: Split out bsp_get_work_area() into its own file and user
BSP Framework to perform more initialization. Let edb7312 and csb336
shared the implementation.
* startup/bspgetworkarea.c: Removed.
2008-09-10 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, startup/bspstart.c: Split out
+1 -1
View File
@@ -28,7 +28,7 @@ dist_project_lib_DATA += startup/linkcmds
include_HEADERS += ../../arm/shared/comm/uart.h
startup_SOURCES = ../../shared/bsppost.c ../../shared/bsplibc.c \
startup/bspgetworkarea.c ../../shared/bsppretaskinghook.c \
../shared/bspgetworkarea.c ../../shared/bsppretaskinghook.c \
../../shared/bsppredriverhook.c startup/bspstart.c \
startup/bspclean.c ../../shared/bootcard.c ../../shared/sbrk.c \
../../shared/gnatinstallhandler.c
@@ -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;
}