summaryrefslogtreecommitdiffstats
path: root/bsps/mips/malta/start/bspreset.c
diff options
context:
space:
mode:
Diffstat (limited to 'bsps/mips/malta/start/bspreset.c')
-rw-r--r--bsps/mips/malta/start/bspreset.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/bsps/mips/malta/start/bspreset.c b/bsps/mips/malta/start/bspreset.c
new file mode 100644
index 0000000000..6d406ea943
--- /dev/null
+++ b/bsps/mips/malta/start/bspreset.c
@@ -0,0 +1,34 @@
+/**
+ * @file
+ *
+ * This file contains the code necessary to reset the Malta board.
+ */
+
+/*
+ * COPYRIGHT (c) 1989-2012.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#include <rtems.h>
+#include <bsp/bootcard.h>
+
+void bsp_reset(void)
+{
+ uint32_t *reset;
+
+ reset= (uint32_t *)0x9F000500;
+ /*
+ * Qemu understands 0x42 to reset simulated machine.
+ * We added code to recognize 0xFF to exit simulator.
+ *
+ * TBD: Qemu PC simulation has option to exit on reset.
+ * find processing of that command line option and
+ * use it to change behaviour of 0x42.
+ */
+ // *reset = 0x42;
+ *reset = 0xFF;
+}