summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/psim/startup
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/powerpc/psim/startup/Makefile.in2
-rw-r--r--c/src/lib/libbsp/powerpc/psim/startup/bspstart.c73
-rw-r--r--c/src/lib/libbsp/powerpc/psim/startup/linkcmds13
-rw-r--r--c/src/lib/libbsp/powerpc/psim/startup/setvec.c10
4 files changed, 40 insertions, 58 deletions
diff --git a/c/src/lib/libbsp/powerpc/psim/startup/Makefile.in b/c/src/lib/libbsp/powerpc/psim/startup/Makefile.in
index b7b98d2278..8ae332fa12 100644
--- a/c/src/lib/libbsp/powerpc/psim/startup/Makefile.in
+++ b/c/src/lib/libbsp/powerpc/psim/startup/Makefile.in
@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
-C_PIECES=bspclean bsppost bspstart main sbrk setvec
+C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
diff --git a/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c b/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c
index e5ce965b43..9deea041c6 100644
--- a/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c
@@ -1,19 +1,16 @@
-/* bspstart.c
- *
+/*
* 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.
*
- * Called by RTEMS::RTEMS constructor in rtems-ctor.cc
- *
- * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1997.
+ * COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* All rights assigned to U.S. Government, 1994.
*
- * This material may be reproduced by or for the U.S. Government pursuant
- * to the copyright license under the clause at DFARS 252.227-7013. This
- * notice must appear in all copies of this file and its derivatives.
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
@@ -68,9 +65,10 @@ rtems_unsigned32 CPU_PPC_CLICKS_PER_TICK;
* approximately 5 seconds of wall time.
*/
-rtems_extension
-fast_idle_switch_hook(rtems_tcb *current_task,
- rtems_tcb *heir_task)
+rtems_extension fast_idle_switch_hook(
+ rtems_tcb *current_task,
+ rtems_tcb *heir_task
+)
{
static rtems_unsigned32 normal_clock = ~0;
static rtems_unsigned32 fast_clock;
@@ -100,12 +98,20 @@ fast_idle_switch_hook(rtems_tcb *current_task,
#endif
/*
- * bsp_libc_init
+ * Use the shared implementations of the following routines
+ */
+
+void bsp_postdriver_hook(void);
+void bsp_libc_init( void *, unsigned32, int );
+
+/*
+ * bsp_pretasking_hook
*
- * Initialize whatever libc we are using called from bsp_postdriver_hook.
+ * BSP pretasking hook. Called just before drivers are initialized.
+ * Used to setup libc and install any BSP extensions.
*/
-void bsp_libc_init(void)
+void bsp_pretasking_hook(void)
{
extern int end;
rtems_unsigned32 heap_start;
@@ -118,38 +124,7 @@ void bsp_libc_init(void)
heap_size = BSP_Configuration.work_space_start - (void *)&end;
heap_size &= 0xfffffff0; /* keep it as a multiple of 16 bytes */
- RTEMS_Malloc_Initialize((void *) heap_start, heap_size, 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 */
-
-}
-
-
-/*
- * bsp_pretasking_hook
- *
- * BSP pretasking hook. Called just before drivers are initialized.
- * Used to setup libc and install any BSP extensions.
- */
-
-void bsp_pretasking_hook(void)
-{
- bsp_libc_init();
+ bsp_libc_init((void *) heap_start, heap_size, 0);
#if PSIM_FAST_IDLE
/*
@@ -188,12 +163,6 @@ void bsp_pretasking_hook(void)
}
/*
- * Use the shared bsp_postdriver_hook() implementation
- */
-
-void bsp_postdriver_hook(void);
-
-/*
* bsp_start
*
* This routine does the bulk of the system initialization.
diff --git a/c/src/lib/libbsp/powerpc/psim/startup/linkcmds b/c/src/lib/libbsp/powerpc/psim/startup/linkcmds
index 467d982812..c43cbee273 100644
--- a/c/src/lib/libbsp/powerpc/psim/startup/linkcmds
+++ b/c/src/lib/libbsp/powerpc/psim/startup/linkcmds
@@ -1,3 +1,16 @@
+/*
+ *
+ * COPYRIGHT (c) 1989-1998.
+ * On-Line Applications Research Corporation (OAR).
+ * Copyright assigned to U.S. Government, 1994.
+ *
+ * The license and distribution terms for this file may be
+ * found in found in the file LICENSE in this distribution or at
+ * http://www.OARcorp.com/rtems/license.html.
+ *
+ * $Id$
+ */
+
OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
"elf32-powerpc")
OUTPUT_ARCH(powerpc)
diff --git a/c/src/lib/libbsp/powerpc/psim/startup/setvec.c b/c/src/lib/libbsp/powerpc/psim/startup/setvec.c
index efb3e9d8e0..dcdd94c665 100644
--- a/c/src/lib/libbsp/powerpc/psim/startup/setvec.c
+++ b/c/src/lib/libbsp/powerpc/psim/startup/setvec.c
@@ -29,13 +29,13 @@
*
* Derived from c/src/lib/libbsp/no_cpu/no_bsp/startup/setvec.c:
*
- * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ * COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
- * All rights assigned to U.S. Government, 1994.
+ * Copyright assigned to U.S. Government, 1994.
*
- * This material may be reproduced by or for the U.S. Government pursuant
- * to the copyright license under the clause at DFARS 252.227-7013. This
- * notice must appear in all copies of this file and its derivatives.
+ * The license and distribution terms for this file may be
+ * found in found in the file LICENSE in this distribution or at
+ * http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/