diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-09-13 13:45:05 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-09-13 13:45:05 +0000 |
commit | 456456632d24d9a7ca068d9f8f93f3c50f93e705 (patch) | |
tree | b1bead1e51711bee065a6eb802f5af762059d141 /c/src/lib/libbsp/arm/vegaplus/startup/exit.c | |
parent | 2000-09-13 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff) | |
download | rtems-456456632d24d9a7ca068d9f8f93f3c50f93e705.tar.bz2 |
2000-09-13 Emmanuel Raguet <raguet@crf.canon.fr>
* vegaplus BSP submitted by Emmanuel Raguet <raguet@crf.canon.fr> and
Eric Valette <valette@crf.canon.fr>.
* vegaplus/bsp_specs, configure.in, console/Makefile.am,
include/Makefile.am, include/bsp.h, include/registers.h,
irq/Makefile.am, irq/bsp_irq_asm.S, irq/bsp_irq_init.c, irq/irq.c,
irq/irq.h, start/Makefile.am, start/start.S, startup/Makefile.am,
startup/bspstart.c, startup/exit.c, startup/linkcmds,
wrapup/Makefile.am: New files.
Diffstat (limited to 'c/src/lib/libbsp/arm/vegaplus/startup/exit.c')
-rw-r--r-- | c/src/lib/libbsp/arm/vegaplus/startup/exit.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/arm/vegaplus/startup/exit.c b/c/src/lib/libbsp/arm/vegaplus/startup/exit.c new file mode 100644 index 0000000000..7eb3056585 --- /dev/null +++ b/c/src/lib/libbsp/arm/vegaplus/startup/exit.c @@ -0,0 +1,48 @@ +/*-------------------------------------------------------------------------+ +| exit.c - ARM BSP ++--------------------------------------------------------------------------+ +| Routines to shutdown and reboot the BSP. ++--------------------------------------------------------------------------+ +| +| Copyright (c) 2000 Canon Research Centre France SA. +| Emmanuel Raguet, mailto:raguet@crf.canon.fr +| +| 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. +| ++--------------------------------------------------------------------------*/ + + +#include <stdio.h> +#include <bsp.h> +#include <bspio.h> +#include <rtems/libio.h> + +void rtemsReboot (void) +{ + asm volatile ("b _start"); +} + +void bsp_cleanup(void) +{ + unsigned char ch; + static char line[]="\nEXECUTIVE SHUTDOWN! Any key to reboot..."; + /* + * AT this point, the console driver is disconnected => we must + * use polled output/input. This is exactly what printk + * does. + */ + printk("\n"); + printk(line); + ch = BSP_poll_char(); + rtemsReboot(); +} + + + + + + + + |