summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-15 17:54:11 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-15 17:54:11 +0000
commitc51efdcd623f58669aa07dd674f3601cfa1f7eee (patch)
tree2ba5812b661d508ced0a066f32554ad6b4aaf386
parent2008-09-15 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-c51efdcd623f58669aa07dd674f3601cfa1f7eee.tar.bz2
2008-09-15 Joel Sherrill <joel.sherrill@oarcorp.com>
* shared/bspstart.c: Use shared bsp_get_work_area() in its own file and rely on BSP Framework to perform more initialization. * shared/bspgetworkarea.c: New file.
-rw-r--r--c/src/lib/libbsp/sparc/ChangeLog6
-rw-r--r--c/src/lib/libbsp/sparc/shared/bspgetworkarea.c39
-rw-r--r--c/src/lib/libbsp/sparc/shared/bspstart.c23
3 files changed, 45 insertions, 23 deletions
diff --git a/c/src/lib/libbsp/sparc/ChangeLog b/c/src/lib/libbsp/sparc/ChangeLog
index ed894d2d9a..209308f47b 100644
--- a/c/src/lib/libbsp/sparc/ChangeLog
+++ b/c/src/lib/libbsp/sparc/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-15 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * shared/bspstart.c: Use shared bsp_get_work_area() in its own file and
+ rely on BSP Framework to perform more initialization.
+ * shared/bspgetworkarea.c: New file.
+
2008-08-18 Ralf Corsépius <ralf.corsepius@rtems.org>
* shared/bspstart.c: Remove bogus local declaration.
diff --git a/c/src/lib/libbsp/sparc/shared/bspgetworkarea.c b/c/src/lib/libbsp/sparc/shared/bspgetworkarea.c
new file mode 100644
index 0000000000..ec4f30f403
--- /dev/null
+++ b/c/src/lib/libbsp/sparc/shared/bspgetworkarea.c
@@ -0,0 +1,39 @@
+/*
+ * This set of routines are the BSP specific initialization
+ * support routines.
+ *
+ * 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>
+
+/*
+ * 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
+)
+{
+ /* Tells us where to put the workspace in case remote debugger is present. */
+ extern uint32_t rdb_start;
+ /* must be identical to STACK_SIZE in start.S */
+ #define STACK_SIZE (16 * 1024)
+
+ *work_area_start = &end;
+ *work_area_size = (void *)rdb_start - (void *)&end - STACK_SIZE;
+ *heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
+ *heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
+}
diff --git a/c/src/lib/libbsp/sparc/shared/bspstart.c b/c/src/lib/libbsp/sparc/shared/bspstart.c
index 9c27be19ef..753cfaad6a 100644
--- a/c/src/lib/libbsp/sparc/shared/bspstart.c
+++ b/c/src/lib/libbsp/sparc/shared/bspstart.c
@@ -60,29 +60,6 @@ void bsp_pretasking_hook(void)
}
/*
- * 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
-)
-{
- /* Tells us where to put the workspace in case remote debugger is present. */
- extern uint32_t rdb_start;
- /* must be identical to STACK_SIZE in start.S */
- #define STACK_SIZE (16 * 1024)
-
- *work_area_start = &end;
- *work_area_size = (void *)rdb_start - (void *)&end - STACK_SIZE;
- *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.