forked from Imagelibrary/rtems
bsp/gen83xx: Add bsp_restart()
This commit is contained in:
@@ -66,6 +66,7 @@ libbsp_a_SOURCES += ../../shared/bsplibc.c \
|
|||||||
startup/bspstart.c \
|
startup/bspstart.c \
|
||||||
../../shared/bspclean.c \
|
../../shared/bspclean.c \
|
||||||
startup/bspreset.c \
|
startup/bspreset.c \
|
||||||
|
startup/bsprestart.c \
|
||||||
../../shared/bspgetworkarea.c \
|
../../shared/bspgetworkarea.c \
|
||||||
../../shared/src/bsp-uboot-board-info.c \
|
../../shared/src/bsp-uboot-board-info.c \
|
||||||
../shared/uboot_getenv.c
|
../shared/uboot_getenv.c
|
||||||
|
|||||||
@@ -145,6 +145,8 @@ void mpc83xx_zero_4( void *dest, size_t n);
|
|||||||
|
|
||||||
void cpu_init( void);
|
void cpu_init( void);
|
||||||
|
|
||||||
|
void bsp_restart(void *addr);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
24
c/src/lib/libbsp/powerpc/gen83xx/startup/bsprestart.c
Normal file
24
c/src/lib/libbsp/powerpc/gen83xx/startup/bsprestart.c
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2008-2012 embedded brains GmbH. All rights reserved.
|
||||||
|
*
|
||||||
|
* embedded brains GmbH
|
||||||
|
* Obere Lagerstr. 30
|
||||||
|
* 82178 Puchheim
|
||||||
|
* Germany
|
||||||
|
* <rtems@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)();
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user