summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sparc/shared/bspgetworkarea.c
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 /c/src/lib/libbsp/sparc/shared/bspgetworkarea.c
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.
Diffstat (limited to 'c/src/lib/libbsp/sparc/shared/bspgetworkarea.c')
-rw-r--r--c/src/lib/libbsp/sparc/shared/bspgetworkarea.c39
1 files changed, 39 insertions, 0 deletions
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;
+}