summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/dmv152
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-03-21 15:37:18 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-03-21 15:37:18 +0000
commite2a2ec6016c9bb3f3146c701bbe950af212c097c (patch)
tree065452e3ecb58b60fb720dcd378e620089d4b407 /c/src/lib/libbsp/m68k/dmv152
parentFixed spacing to be consistent with other CPUs. (diff)
downloadrtems-e2a2ec6016c9bb3f3146c701bbe950af212c097c.tar.bz2
Switch to using a shared main() for all of the embedded BSPs
based on the GNU tools. This usually involved correcting the type of bsp_start(), bsp_cleanup(), adjusting the start code to call the right start routine (the shared boot_card()), and then removing code from bsp_start() which was performed in the new boot_card()/main() path.
Diffstat (limited to 'c/src/lib/libbsp/m68k/dmv152')
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/startup/Makefile.in2
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/startup/bspclean.c21
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c19
3 files changed, 23 insertions, 19 deletions
diff --git a/c/src/lib/libbsp/m68k/dmv152/startup/Makefile.in b/c/src/lib/libbsp/m68k/dmv152/startup/Makefile.in
index 6f35d68576..4e05da9431 100644
--- a/c/src/lib/libbsp/m68k/dmv152/startup/Makefile.in
+++ b/c/src/lib/libbsp/m68k/dmv152/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=bspstart sbrk setvec vmeintr
+C_PIECES=bspclean bspstart main sbrk setvec vmeintr
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
diff --git a/c/src/lib/libbsp/m68k/dmv152/startup/bspclean.c b/c/src/lib/libbsp/m68k/dmv152/startup/bspclean.c
new file mode 100644
index 0000000000..ef69a6f8f3
--- /dev/null
+++ b/c/src/lib/libbsp/m68k/dmv152/startup/bspclean.c
@@ -0,0 +1,21 @@
+/*
+ * This routine performs final cleanup at exit time.
+ *
+ * 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 the file LICENSE in this distribution or at
+ * http://www.OARcorp.com/rtems/license.html.
+ *
+ * $Id$
+ */
+
+#include <bsp.h>
+
+void bsp_cleanup( void )
+{
+
+ VME_interrupt_Disable( 0xff );
+}
diff --git a/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c b/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
index 02b5e9bd8a..be1edde6fe 100644
--- a/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
@@ -139,21 +139,12 @@ bsp_postdriver_hook(void)
rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
}
-int main(
- int argc,
- char **argv,
- char **environp
-)
+void bsp_start( void )
{
m68k_isr_entry *monitors_vector_table;
int index;
void *vbr;
- if ((argc > 0) && argv && argv[0])
- rtems_progname = argv[0];
- else
- rtems_progname = "RTEMS";
-
monitors_vector_table = (m68k_isr_entry *)0; /* Monitor Vectors are at 0 */
m68k_set_vbr( monitors_vector_table );
@@ -246,13 +237,5 @@ int main(
rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
- rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
- /* does not return */
-
/* Clock_exit is done as an atexit() function */
-
- VME_interrupt_Disable( 0xff );
-
- /* return like a "normal" subroutine to the monitor */
- return 0;
}