summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/unix/posix/startup/bspstart.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/unix/posix/startup/bspstart.c117
1 files changed, 21 insertions, 96 deletions
diff --git a/c/src/lib/libbsp/unix/posix/startup/bspstart.c b/c/src/lib/libbsp/unix/posix/startup/bspstart.c
index 11b9b67e19..4e0955e32a 100644
--- a/c/src/lib/libbsp/unix/posix/startup/bspstart.c
+++ b/c/src/lib/libbsp/unix/posix/startup/bspstart.c
@@ -1,5 +1,4 @@
-/* bsp_start()
- *
+/*
* This routine starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
@@ -7,10 +6,6 @@
*
* Called by RTEMS::RTEMS constructor in startup-ctor.cc
*
- * INPUT: NONE
- *
- * OUTPUT: NONE
- *
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
@@ -68,55 +63,11 @@ char **rtems_argv;
rtems_unsigned32 CPU_CLICKS_PER_TICK;
/*
- * Function: bsp_libc_init
- * Created: 94/12/6
- *
- * Description:
- * Initialize whatever libc we are using
- * called from bsp_postdriver_hook
- *
- *
- * Parameters:
- * none
- *
- * Returns:
- * none.
- *
- * Side Effects:
- *
- *
- * Notes:
- *
- * Deficiencies/ToDo:
- *
- *
+ * Use the shared implementations of the following routines
*/
-
-void
-bsp_libc_init(void)
-{
- void *heap_start;
-
- if (getenv("RTEMS_HEAPSPACE_SIZE"))
- Heap_size = strtol(getenv("RTEMS_HEAPSPACE_SIZE"), 0, 0);
- else
- Heap_size = DEFAULT_HEAPSPACE_SIZE;
- heap_start = 0;
-
- RTEMS_Malloc_Initialize((void *)heap_start, Heap_size, 1024 * 1024);
-
- /*
- * Init the RTEMS libio facility to provide UNIX-like system
- * calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
- * Uses malloc() to get area for the iops, so must be after malloc init
- */
-
- rtems_libio_init();
-
- libc_init(1);
-}
-
+void bsp_postdriver_hook(void);
+void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
@@ -126,28 +77,24 @@ bsp_libc_init(void)
* BSP pretasking hook. Called just before drivers are initialized.
* Used to setup libc and install any BSP extensions.
*
- * Parameters:
- * none
- *
- * Returns:
- * nada
- *
- * Side Effects:
- * installs a few extensions
- *
- * Notes:
+ * NOTES:
* Must not use libc (to do io) from here, since drivers are
* not yet initialized.
- *
- * Deficiencies/ToDo:
- *
- *
*/
-void
-bsp_pretasking_hook(void)
+void bsp_pretasking_hook(void)
{
- bsp_libc_init();
+ void *heap_start;
+
+ if (getenv("RTEMS_HEAPSPACE_SIZE"))
+ Heap_size = strtol(getenv("RTEMS_HEAPSPACE_SIZE"), 0, 0);
+ else
+ Heap_size = DEFAULT_HEAPSPACE_SIZE;
+
+ heap_start = 0;
+
+ bsp_libc_init((void *)heap_start, Heap_size, 1024 * 1024);
+
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
@@ -165,40 +112,18 @@ bsp_pretasking_hook(void)
* DO NOT Use the shared bsp_postdriver_hook() implementation
*/
-void
-bsp_postdriver_hook(void)
+void bsp_postdriver_hook(void)
{
return;
}
/*
- * Function: bsp_start
- * Created: 94/12/6
- *
- * Description:
- * called by crt0 as our "main" equivalent
- *
- *
- *
- * Parameters:
- *
- *
- * Returns:
- *
- *
- * Side Effects:
- *
- *
- * Notes:
- *
- *
- * Deficiencies/ToDo:
- *
+ * bsp_start
*
+ * This routine does the bulk of the system initialization.
*/
-void
-bsp_start(void)
+void bsp_start(void)
{
unsigned32 workspace_ptr;