summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/beatnik/startup/bspreset.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/powerpc/beatnik/startup/bspreset.c')
-rw-r--r--c/src/lib/libbsp/powerpc/beatnik/startup/bspreset.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/powerpc/beatnik/startup/bspreset.c b/c/src/lib/libbsp/powerpc/beatnik/startup/bspreset.c
new file mode 100644
index 0000000000..0e6af195f4
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/beatnik/startup/bspreset.c
@@ -0,0 +1,16 @@
+#include <rtems.h>
+#include <bsp.h>
+#include <rtems/bspIo.h>
+#include <libcpu/io.h>
+#include <libcpu/stackTrace.h>
+
+void bsp_reset()
+{
+
+ printk("Printing a stack trace for your convenience :-)\n");
+ CPU_print_stack();
+
+ printk("RTEMS terminated; Rebooting ...\n");
+ /* Mvme5500 board reset : 2004 S. Kate Feng <feng1@bnl.gov> */
+ out_8((volatile unsigned char*) (BSP_MV64x60_DEV1_BASE +2), 0x80);
+}