summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-14 21:38:25 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-14 21:38:25 +0000
commit6a39cd4fec7dadd27f53b7943f77881da4bb884c (patch)
tree2545f93ba7b769d7af9691801a08d24cac61b452
parent2008-09-14 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-6a39cd4fec7dadd27f53b7943f77881da4bb884c.tar.bz2
2008-09-14 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, startup/bspstart.c: Split out bsp_get_work_area() into its own file and use BSP Framework to perform more initialization. * startup/bspgetworkarea.c: New file.
-rw-r--r--c/src/lib/libbsp/mips/jmr3904/ChangeLog6
-rw-r--r--c/src/lib/libbsp/mips/jmr3904/Makefile.am2
-rw-r--r--c/src/lib/libbsp/mips/jmr3904/startup/bspgetworkarea.c34
-rw-r--r--c/src/lib/libbsp/mips/jmr3904/startup/bspstart.c24
4 files changed, 43 insertions, 23 deletions
diff --git a/c/src/lib/libbsp/mips/jmr3904/ChangeLog b/c/src/lib/libbsp/mips/jmr3904/ChangeLog
index f7cd224502..0d2034bcca 100644
--- a/c/src/lib/libbsp/mips/jmr3904/ChangeLog
+++ b/c/src/lib/libbsp/mips/jmr3904/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-14 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * Makefile.am, startup/bspstart.c: Split out bsp_get_work_area() into
+ its own file and use BSP Framework to perform more initialization.
+ * startup/bspgetworkarea.c: New file.
+
2008-09-10 Joel Sherrill <joel.sherrill@oarcorp.com>
* include/bsp.h: Review of all bsp_cleanup() implementations. In this
diff --git a/c/src/lib/libbsp/mips/jmr3904/Makefile.am b/c/src/lib/libbsp/mips/jmr3904/Makefile.am
index f6373be42e..99ff82ed5d 100644
--- a/c/src/lib/libbsp/mips/jmr3904/Makefile.am
+++ b/c/src/lib/libbsp/mips/jmr3904/Makefile.am
@@ -31,7 +31,7 @@ dist_project_lib_DATA += startup/linkcmds
startup_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \
../../shared/bsppredriverhook.c ../../shared/bsppost.c \
- ../../shared/bsppretaskinghook.c \
+ ../../shared/bsppretaskinghook.c startup/bspgetworkarea.c \
startup/bspstart.c ../../shared/bootcard.c ../../shared/sbrk.c \
../../shared/gnatinstallhandler.c ../../shared/setvec.c
clock_SOURCES = clock/clockdrv.c
diff --git a/c/src/lib/libbsp/mips/jmr3904/startup/bspgetworkarea.c b/c/src/lib/libbsp/mips/jmr3904/startup/bspgetworkarea.c
new file mode 100644
index 0000000000..f491b8f3ba
--- /dev/null
+++ b/c/src/lib/libbsp/mips/jmr3904/startup/bspgetworkarea.c
@@ -0,0 +1,34 @@
+/*
+ * COPYRIGHT (c) 1989-2008.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * 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>
+
+extern int WorkspaceBase;
+extern int 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
+)
+{
+ *work_area_start = &WorkspaceBase;
+ *work_area_size = (void *)&end - (void *)&WorkspaceBase;
+ *heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
+ *heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
+}
diff --git a/c/src/lib/libbsp/mips/jmr3904/startup/bspstart.c b/c/src/lib/libbsp/mips/jmr3904/startup/bspstart.c
index 0c1be686cb..612cdbad60 100644
--- a/c/src/lib/libbsp/mips/jmr3904/startup/bspstart.c
+++ b/c/src/lib/libbsp/mips/jmr3904/startup/bspstart.c
@@ -18,27 +18,6 @@
#include <bsp/bootcard.h>
/*
- * 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
-)
-{
- extern int WorkspaceBase;
- extern int end;
-
- *work_area_start = &WorkspaceBase;
- *work_area_size = (void *)&end - (void *)&WorkspaceBase;
- *heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
- *heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
-}
-
-/*
* bsp_start
*
* This routine does the bulk of the system initialization.
@@ -61,7 +40,8 @@ void clear_cache( void *address, size_t n )
}
/* Structure filled in by get_mem_info. Only the size field is
- actually used (to clear bss), so the others aren't even filled in. */
+ * actually used (to clear bss), so the others aren't even filled in.
+ */
struct s_mem
{