[rtems commit] bsp/gen83xx: Add bsp_restart()
Sebastian Huber
sebh at rtems.org
Wed Jan 9 15:41:05 UTC 2013
Module: rtems
Branch: master
Commit: d4e2f337607031d6c97a68ebccd98516d637854f
Changeset: http://git.rtems.org/rtems/commit/?id=d4e2f337607031d6c97a68ebccd98516d637854f
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Jan 9 09:28:19 2013 +0100
bsp/gen83xx: Add bsp_restart()
---
c/src/lib/libbsp/powerpc/gen83xx/Makefile.am | 1 +
c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h | 2 +
.../libbsp/powerpc/gen83xx/startup/bsprestart.c | 24 ++++++++++++++++++++
3 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/Makefile.am b/c/src/lib/libbsp/powerpc/gen83xx/Makefile.am
index 4ee0d24..7d970ae 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/gen83xx/Makefile.am
@@ -66,6 +66,7 @@ libbsp_a_SOURCES += ../../shared/bsplibc.c \
startup/bspstart.c \
../../shared/bspclean.c \
startup/bspreset.c \
+ startup/bsprestart.c \
../../shared/bspgetworkarea.c \
../../shared/src/bsp-uboot-board-info.c \
../shared/uboot_getenv.c
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h b/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h
index fcead98..cc97cdc 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h
@@ -145,6 +145,8 @@ void mpc83xx_zero_4( void *dest, size_t n);
void cpu_init( void);
+void bsp_restart(void *addr);
+
#ifdef __cplusplus
}
#endif
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/startup/bsprestart.c b/c/src/lib/libbsp/powerpc/gen83xx/startup/bsprestart.c
new file mode 100644
index 0000000..c095478
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen83xx/startup/bsprestart.c
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2008-2012 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems at embedded-brains.de>
+ *
+ * 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.
+ */
+
+#include <bsp.h>
+
+void bsp_restart(void *addr)
+{
+ rtems_interrupt_level level;
+ void (*start)(void) = addr;
+
+ rtems_interrupt_disable(level);
+ (*start)();
+}
More information about the vc
mailing list