summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-04-15 15:13:01 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-04-15 15:13:01 +0000
commitb6394ae43432a3c69f1737d1ed1e23db8e7896ba (patch)
treea7f1ad9907ad430f3a3037ef606ba1bfc5ceb386 /c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
parentb3d3a34edd4943996a3bb167f234bb2495f6230f (diff)
downloadrtems-b6394ae43432a3c69f1737d1ed1e23db8e7896ba.tar.bz2
Transitioned to shared bsp_libc_init() and cleaned up comments.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c62
1 files changed, 18 insertions, 44 deletions
diff --git a/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c b/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
index 04287c82db..fef39736d1 100644
--- a/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
@@ -1,14 +1,9 @@
-/* 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
* before this routine is invoked.
*
- * INPUT: NONE
- *
- * OUTPUT: NONE
- *
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
@@ -39,38 +34,12 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
-/* Initialize whatever libc we are using
- * called from postdriver hook
+/*
+ * Use the shared implementations of the following routines
*/
-
-void bsp_libc_init()
-{
- extern int end;
- rtems_unsigned32 heap_start;
-
- heap_start = (rtems_unsigned32) &end;
- if (heap_start & (CPU_ALIGNMENT-1))
- heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
-
- RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
-
- /*
- * 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();
-
- /*
- * Set up for the libc handling.
- */
-
- if (BSP_Configuration.ticks_per_timeslice > 0)
- libc_init(1); /* reentrant if possible */
- else
- libc_init(0); /* non-reentrant */
-}
+
+void bsp_postdriver_hook(void);
+void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
@@ -86,22 +55,27 @@ void bsp_libc_init()
*
*/
-void
-bsp_pretasking_hook(void)
+void bsp_pretasking_hook(void)
{
- bsp_libc_init();
+ extern int end;
+ rtems_unsigned32 heap_start;
+
+ heap_start = (rtems_unsigned32) &end;
+ if (heap_start & (CPU_ALIGNMENT-1))
+ heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
+
+ bsp_libc_init((void *) heap_start, 64 * 1024, 0);
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
-
/*
- * Use the shared bsp_postdriver_hook() implementation
+ * bsp_start
+ *
+ * This routine does the bulk of the system initialization.
*/
-
-void bsp_postdriver_hook(void);
void bsp_start( void )
{