summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/c4x/c4xsim
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-16 20:19:22 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-16 20:19:22 +0000
commit895321b7ee253c41d0b68ffb34517e4d634a4e7c (patch)
tree0a4401b567c3f40eff6817cc291f92c924b367f0 /c/src/lib/libbsp/c4x/c4xsim
parent2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-895321b7ee253c41d0b68ffb34517e4d634a4e7c.tar.bz2
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.
Diffstat (limited to 'c/src/lib/libbsp/c4x/c4xsim')
-rw-r--r--c/src/lib/libbsp/c4x/c4xsim/ChangeLog6
-rw-r--r--c/src/lib/libbsp/c4x/c4xsim/Makefile.am2
-rw-r--r--c/src/lib/libbsp/c4x/c4xsim/startup/bspgetworkarea.c39
-rw-r--r--c/src/lib/libbsp/c4x/c4xsim/startup/linkcmds3
4 files changed, 9 insertions, 41 deletions
diff --git a/c/src/lib/libbsp/c4x/c4xsim/ChangeLog b/c/src/lib/libbsp/c4x/c4xsim/ChangeLog
index 1975bedf10..0ac3e70e67 100644
--- a/c/src/lib/libbsp/c4x/c4xsim/ChangeLog
+++ b/c/src/lib/libbsp/c4x/c4xsim/ChangeLog
@@ -1,5 +1,11 @@
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
bsp_get_work_area() in its own file and rely on BSP Framework to
perform more initialization.
diff --git a/c/src/lib/libbsp/c4x/c4xsim/Makefile.am b/c/src/lib/libbsp/c4x/c4xsim/Makefile.am
index ef98387410..1595cb40db 100644
--- a/c/src/lib/libbsp/c4x/c4xsim/Makefile.am
+++ b/c/src/lib/libbsp/c4x/c4xsim/Makefile.am
@@ -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 \
diff --git a/c/src/lib/libbsp/c4x/c4xsim/startup/bspgetworkarea.c b/c/src/lib/libbsp/c4x/c4xsim/startup/bspgetworkarea.c
deleted file mode 100644
index e8c464a1da..0000000000
--- a/c/src/lib/libbsp/c4x/c4xsim/startup/bspgetworkarea.c
+++ /dev/null
@@ -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;
-}
-
diff --git a/c/src/lib/libbsp/c4x/c4xsim/startup/linkcmds b/c/src/lib/libbsp/c4x/c4xsim/startup/linkcmds
index 2526b64663..46698ea4ba 100644
--- a/c/src/lib/libbsp/c4x/c4xsim/startup/linkcmds
+++ b/c/src/lib/libbsp/c4x/c4xsim/startup/linkcmds
@@ -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 :