summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-22 21:53:54 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-22 21:53:54 +0000
commit72798eef80d8b79bdd72f3ebd10fac109c0af088 (patch)
treef2052e14c9402851134b496df3aee7f8894cf413
parent2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-72798eef80d8b79bdd72f3ebd10fac109c0af088.tar.bz2
2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* startup/bspreset.c: New file.
-rw-r--r--c/src/lib/libbsp/arm/edb7312/ChangeLog4
-rw-r--r--c/src/lib/libbsp/arm/edb7312/startup/bspreset.c16
-rw-r--r--c/src/lib/libbsp/arm/gba/ChangeLog4
-rw-r--r--c/src/lib/libbsp/arm/gba/startup/bspreset.c16
-rw-r--r--c/src/lib/libbsp/arm/nds/ChangeLog4
-rw-r--r--c/src/lib/libbsp/arm/nds/startup/bspreset.c19
-rw-r--r--c/src/lib/libbsp/arm/rtl22xx/ChangeLog4
-rw-r--r--c/src/lib/libbsp/arm/rtl22xx/startup/bspreset.c32
-rw-r--r--c/src/lib/libbsp/i386/pc386/ChangeLog4
-rw-r--r--c/src/lib/libbsp/i386/pc386/startup/bspreset.c20
-rw-r--r--c/src/lib/libbsp/mips/csb350/ChangeLog4
-rw-r--r--c/src/lib/libbsp/mips/csb350/startup/bspreset.c24
12 files changed, 151 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/arm/edb7312/ChangeLog b/c/src/lib/libbsp/arm/edb7312/ChangeLog
index d78ebf87e9..dd379717bd 100644
--- a/c/src/lib/libbsp/arm/edb7312/ChangeLog
+++ b/c/src/lib/libbsp/arm/edb7312/ChangeLog
@@ -1,5 +1,9 @@
2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
+ * startup/bspreset.c: New file.
+
+2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
+
* Makefile.am, configure.ac, console/uart.c: Use standardized
bsp_cleanup() which can optionally print a message, poll for user to
press key, and call bsp_reset(). Using this eliminates the various
diff --git a/c/src/lib/libbsp/arm/edb7312/startup/bspreset.c b/c/src/lib/libbsp/arm/edb7312/startup/bspreset.c
new file mode 100644
index 0000000000..5c7f23e880
--- /dev/null
+++ b/c/src/lib/libbsp/arm/edb7312/startup/bspreset.c
@@ -0,0 +1,16 @@
+/*
+ * Copyright (c) 2002 by Jay Monkman <jtm@smoothsmoothie.com>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#include <bsp.h>
+
+void bsp_reset(void)
+{
+ asm volatile ("b _start");
+}
diff --git a/c/src/lib/libbsp/arm/gba/ChangeLog b/c/src/lib/libbsp/arm/gba/ChangeLog
index a155171829..c3655e07eb 100644
--- a/c/src/lib/libbsp/arm/gba/ChangeLog
+++ b/c/src/lib/libbsp/arm/gba/ChangeLog
@@ -1,5 +1,9 @@
2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
+ * startup/bspreset.c: New file.
+
+2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
+
* Makefile.am, configure.ac, console/console.c: Use standardized
bsp_cleanup() which can optionally print a message, poll for user to
press key, and call bsp_reset(). Using this eliminates the various
diff --git a/c/src/lib/libbsp/arm/gba/startup/bspreset.c b/c/src/lib/libbsp/arm/gba/startup/bspreset.c
new file mode 100644
index 0000000000..6af1a3f18b
--- /dev/null
+++ b/c/src/lib/libbsp/arm/gba/startup/bspreset.c
@@ -0,0 +1,16 @@
+/*
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#include <bsp.h>
+#include <gba.h>
+
+void bsp_reset(void)
+{
+ asm volatile ("ldr r0, =_gba_reset");
+ asm volatile ("bx r0");
+}
diff --git a/c/src/lib/libbsp/arm/nds/ChangeLog b/c/src/lib/libbsp/arm/nds/ChangeLog
index c24dd39e83..b586bc26d9 100644
--- a/c/src/lib/libbsp/arm/nds/ChangeLog
+++ b/c/src/lib/libbsp/arm/nds/ChangeLog
@@ -1,5 +1,9 @@
2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
+ * startup/bspreset.c: New file.
+
+2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
+
* Makefile.am, configure.ac: Use standardized bsp_cleanup() which can
optionally print a message, poll for user to press key, and call
bsp_reset(). Using this eliminates the various bsp_cleanup()
diff --git a/c/src/lib/libbsp/arm/nds/startup/bspreset.c b/c/src/lib/libbsp/arm/nds/startup/bspreset.c
new file mode 100644
index 0000000000..85966a7804
--- /dev/null
+++ b/c/src/lib/libbsp/arm/nds/startup/bspreset.c
@@ -0,0 +1,19 @@
+/*
+ * RTEMS for Nintendo DS platform initialization.
+ * Copyright (c) 2008 by Matthieu Bucchianeri <mbucchia@gmail.com>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE
+ *
+ * $Id$
+ */
+
+#include <bsp.h>
+#include <bsp/bootcard.h>
+#include <nds.h>
+
+void bsp_reset(void)
+{
+ swiSoftReset();
+}
diff --git a/c/src/lib/libbsp/arm/rtl22xx/ChangeLog b/c/src/lib/libbsp/arm/rtl22xx/ChangeLog
index a5409dd23c..e967279dbe 100644
--- a/c/src/lib/libbsp/arm/rtl22xx/ChangeLog
+++ b/c/src/lib/libbsp/arm/rtl22xx/ChangeLog
@@ -1,5 +1,9 @@
2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
+ * startup/bspreset.c: New file.
+
+2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
+
* Makefile.am, configure.ac, console/uart.c, startup/bspstart.c: Use
standardized bsp_cleanup() which can optionally print a message, poll
for user to press key, and call bsp_reset(). Using this eliminates
diff --git a/c/src/lib/libbsp/arm/rtl22xx/startup/bspreset.c b/c/src/lib/libbsp/arm/rtl22xx/startup/bspreset.c
new file mode 100644
index 0000000000..9af7807a37
--- /dev/null
+++ b/c/src/lib/libbsp/arm/rtl22xx/startup/bspreset.c
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2007 by Ray Xu <rayx.cn@gmail.com>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#include <bsp.h>
+#include <lpc22xx.h>
+
+void bsp_reset(void)
+{
+ rtems_interrupt_level level;
+
+ rtems_interrupt_disable(level);
+
+#ifdef __thumb__
+ int tmp;
+ asm volatile (" .code 16 \n" \
+ "ldr %[tmp], =_start \n" \
+ "bx %[tmp] \n" \
+ "nop \n" \
+ : [tmp]"=&r" (tmp) );
+#else
+ asm volatile ("b _start");
+#endif
+
+ while(1);
+}
diff --git a/c/src/lib/libbsp/i386/pc386/ChangeLog b/c/src/lib/libbsp/i386/pc386/ChangeLog
index 69291b1a41..b9f43d4076 100644
--- a/c/src/lib/libbsp/i386/pc386/ChangeLog
+++ b/c/src/lib/libbsp/i386/pc386/ChangeLog
@@ -1,5 +1,9 @@
2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
+ * startup/bspreset.c: New file.
+
+2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
+
* Makefile.am, configure.ac, console/inch.c, console/keyboard.c,
include/bsp.h: Use standardized bsp_cleanup() which can optionally
print a message, poll for user to press key, and call bsp_reset().
diff --git a/c/src/lib/libbsp/i386/pc386/startup/bspreset.c b/c/src/lib/libbsp/i386/pc386/startup/bspreset.c
new file mode 100644
index 0000000000..527b13cf4b
--- /dev/null
+++ b/c/src/lib/libbsp/i386/pc386/startup/bspreset.c
@@ -0,0 +1,20 @@
+/*
+ * COPYRIGHT (c) 1989-2008.
+ * 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.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#include <rtems.h>
+#include <bsp.h>
+#include <bsp/bootcard.h>
+
+void bsp_reset(void)
+{
+ /* shutdown and reboot */
+ outport_byte(0x64, 0xFE); /* use keyboard controler to do the job... */
+}
diff --git a/c/src/lib/libbsp/mips/csb350/ChangeLog b/c/src/lib/libbsp/mips/csb350/ChangeLog
index 10bd921afc..7d5c9eea81 100644
--- a/c/src/lib/libbsp/mips/csb350/ChangeLog
+++ b/c/src/lib/libbsp/mips/csb350/ChangeLog
@@ -1,5 +1,9 @@
2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
+ * startup/bspreset.c: New file.
+
+2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
+
* Makefile.am, configure.ac, console/console-io.c: Use standardized
bsp_cleanup() which can optionally print a message, poll for user to
press key, and call bsp_reset(). Using this eliminates the various
diff --git a/c/src/lib/libbsp/mips/csb350/startup/bspreset.c b/c/src/lib/libbsp/mips/csb350/startup/bspreset.c
new file mode 100644
index 0000000000..4bfdbddae3
--- /dev/null
+++ b/c/src/lib/libbsp/mips/csb350/startup/bspreset.c
@@ -0,0 +1,24 @@
+/*
+ * COPYRIGHT (c) 1989-2008.
+ * 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.com/license/LICENSE.
+ *
+ * $Id$
+ */
+#include <rtems.h>
+#include <libcpu/au1x00.h>
+
+void bsp_reset(void)
+{
+ void (*reset_func)(void);
+
+ reset_func = (void *)0xbfc00000;
+
+ mips_set_sr( 0x00200000 ); /* all interrupts off, boot exception vectors */
+
+ /* Try to restart bootloader */
+ reset_func();
+}