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 21:35:23 +00:00
parent 91b8fcfb81
commit 284ed06a28
12 changed files with 31 additions and 125 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-14 Joel Sherrill <joel.sherrill@oarcorp.com> 2008-09-14 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, startup/bspstart.c: Create * Makefile.am, configure.ac, startup/bspstart.c: Create

View File

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

View File

@@ -1,37 +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 *_WorkspaceStart;
extern void *_RAMEnd;
/*
* 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)&_RAMEnd - (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

@@ -18,6 +18,10 @@ ENTRY(download_entry)
kIntrStackSize = 16K; kIntrStackSize = 16K;
kMainStackSize = 64K; kMainStackSize = 64K;
RamBase = DEFINED(RamBase) ? RamBase : 0;
RamSize = DEFINED(RamSize) ? RamSize : 256M;
HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
MEMORY { MEMORY {
RAM : ORIGIN = 0, LENGTH = 256M RAM : ORIGIN = 0, LENGTH = 256M
/*FLASH : ORIGIN = 0xFFE00000, LENGTH = 16M*/ /*FLASH : ORIGIN = 0xFFE00000, LENGTH = 16M*/
@@ -238,10 +242,7 @@ SECTIONS
stack.end = .; stack.end = .;
/* RTEMS workspace: size specified by application */ /* RTEMS workspace: size specified by application */
_WorkspaceStart = ALIGN(0x20); WorkAreaBase = ALIGN(0x20);
/* Heap: from end of the workspace to _RAMEnd */
_RAMEnd = ORIGIN(RAM) + LENGTH(RAM);
/* Debugging information */ /* Debugging information */
.line 0 : { *(.line) } .line 0 : { *(.line) }

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> 2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* startup/bspstart.c: Remove unnecessary includes of * startup/bspstart.c: Remove unnecessary includes of

View File

@@ -35,7 +35,7 @@ vectors_SOURCES = vectors/vectors.h vectors/vectors_init.c \
vectors/vectors.S vectors/vectors.S
startup_SOURCES = ../../shared/bspclean.c ../../shared/bsplibc.c \ startup_SOURCES = ../../shared/bspclean.c ../../shared/bsplibc.c \
../../shared/bsppost.c ../../shared/bsppredriverhook.c \ ../../shared/bsppost.c ../../shared/bsppredriverhook.c \
../../shared/bsppretaskinghook.c startup/bspgetworkarea.c \ ../../shared/bsppretaskinghook.c ../../shared/bspgetworkarea.c \
startup/bspstart.c ../../shared/bootcard.c \ startup/bspstart.c ../../shared/bootcard.c \
startup/imbx8xx.c startup/mmutlbtab.c \ startup/imbx8xx.c startup/mmutlbtab.c \
../../shared/sbrk.c ../../shared/gnatinstallhandler.c startup/start.S ../../shared/sbrk.c ../../shared/gnatinstallhandler.c startup/start.S

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 *WorkspaceBase;
/*
* 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)&WorkspaceBase;
*work_area_start = (void *)&WorkspaceBase;
*work_area_size = size;
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
*heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
}

View File

@@ -17,7 +17,8 @@ ENTRY(start)
*/ */
StackSize = DEFINED(StackSize) ? StackSize : 0x1000; StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
RamBase = DEFINED(RamBase) ? RamBase : 0; RamBase = DEFINED(RamBase) ? RamBase : 0;
RamSize = DEFINED(RamSized) ? RamSize : 4M; RamSize = DEFINED(RamSize) ? RamSize : 4M;
HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
MEMORY MEMORY
{ {
@@ -263,7 +264,7 @@ SECTIONS
intrStack = .; intrStack = .;
PROVIDE(intrStackPtr = intrStack); PROVIDE(intrStackPtr = intrStack);
WorkspaceBase = .; WorkAreaBase = .;
dpram : dpram :
{ {

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-15 Joel Sherrill <joel.sherrill@oarcorp.com> 2008-09-15 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, startup/bspstart.c, startup/linkcmds: Add * Makefile.am, configure.ac, startup/bspstart.c, startup/linkcmds: Add

View File

@@ -39,7 +39,7 @@ startup_SOURCES = ../../shared/bspclean.c ../../shared/bsplibc.c \
../../shared/bsppredriverhook.c ../../shared/bsppost.c \ ../../shared/bsppredriverhook.c ../../shared/bsppost.c \
startup/bspstart.c ../../shared/bootcard.c ../../shared/sbrk.c \ startup/bspstart.c ../../shared/bootcard.c ../../shared/sbrk.c \
../../shared/gnatinstallhandler.c startup/cpuinit.c \ ../../shared/gnatinstallhandler.c startup/cpuinit.c \
startup/bspgetworkarea.c ../../shared/bsppretaskinghook.c ../../shared/bspgetworkarea.c ../../shared/bsppretaskinghook.c
vectors_SOURCES = vectors/vectors_init.c vectors/vectors.h \ vectors_SOURCES = vectors/vectors_init.c vectors/vectors.h \
vectors/vectors.S vectors/vectors.S

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 *WorkspaceBase;
/*
* 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)&WorkspaceBase;
*work_area_start = (void *)&WorkspaceBase;
*work_area_size = size;
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
*heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
}

View File

@@ -20,6 +20,7 @@ ENTRY(start)
StackSize = DEFINED(StackSize) ? StackSize : 0x8000; StackSize = DEFINED(StackSize) ? StackSize : 0x8000;
RamBase = DEFINED(RamBase) ? RamBase : 0x0; RamBase = DEFINED(RamBase) ? RamBase : 0x0;
RamSize = DEFINED(RamSize) ? RamDiskSize : 0x0800000; /* 8M program ram */ RamSize = DEFINED(RamSize) ? RamDiskSize : 0x0800000; /* 8M program ram */
HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
RamDiskBase = DEFINED(RamDiskBase) ? RamDiskBase : 0x0800000; RamDiskBase = DEFINED(RamDiskBase) ? RamDiskBase : 0x0800000;
RamDiskSize = DEFINED(RamDiskSize) ? RamDiskSize : 0x0800000; /* 8M ram disk */ RamDiskSize = DEFINED(RamDiskSize) ? RamDiskSize : 0x0800000; /* 8M ram disk */
@@ -270,7 +271,7 @@ SECTIONS
clear_end = .; clear_end = .;
WorkspaceBase = .; WorkAreaBase = .;
/* Sections for compressed .text and .data */ /* Sections for compressed .text and .data */
/* after the .datarom section is an int specifying */ /* after the .datarom section is an int specifying */