diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-16 19:06:45 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-16 19:06:45 +0000 |
commit | e76068d31feda0483fb2a83fcafe366c08dfc76c (patch) | |
tree | 203af67b4834dc0aad94da9a3b2f253fc17c6f53 /c/src/lib/libbsp/powerpc/psim/startup | |
parent | 2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-e76068d31feda0483fb2a83fcafe366c08dfc76c.tar.bz2 |
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, startup/bspstart.c: Add use of bsp_get_work_area() in
its own file and rely on BSP Framework to perform more
initialization. Remove unnecessary includes of rtems/libio.h and
rtems/libcsupport.h.
* startup/bspgetworkarea.c: New file.
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/powerpc/psim/startup/bspgetworkarea.c | 43 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/psim/startup/bspstart.c | 20 |
2 files changed, 43 insertions, 20 deletions
diff --git a/c/src/lib/libbsp/powerpc/psim/startup/bspgetworkarea.c b/c/src/lib/libbsp/powerpc/psim/startup/bspgetworkarea.c new file mode 100644 index 0000000000..76bd79918d --- /dev/null +++ b/c/src/lib/libbsp/powerpc/psim/startup/bspgetworkarea.c @@ -0,0 +1,43 @@ +/* + * This set of routines starts the application. It includes application, + * board, and monitor specific initialization and configuration. + * The generic CPU dependent initialization has been performed + * before any of these are invoked. + * + * 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 <string.h> +#include <fcntl.h> +#include <bsp.h> +#include <bsp/bootcard.h> + +/* + * system init stack + */ +#define INIT_STACK_SIZE 0x1000 + +/* + * 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 = &end; + *work_area_size = (void *)&RAM_END - (void *)&end; + *heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA; + *heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT; +} diff --git a/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c b/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c index a7c677d5ce..592a6e7703 100644 --- a/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c @@ -19,8 +19,6 @@ #include <bsp.h> #include <bsp/irq.h> #include <bsp/bootcard.h> -#include <rtems/libio.h> -#include <rtems/libcsupport.h> #include <rtems/bspIo.h> #include <rtems/powerpc/powerpc.h> @@ -67,24 +65,6 @@ void _BSP_Fatal_error(unsigned int v) } /* - * 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 = &end; - *work_area_size = (void *)&RAM_END - (void *)&end; - *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. |