diff options
Diffstat (limited to 'c/src/lib/libbsp/mips/malta/startup/bspreset.c')
-rw-r--r-- | c/src/lib/libbsp/mips/malta/startup/bspreset.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/mips/malta/startup/bspreset.c b/c/src/lib/libbsp/mips/malta/startup/bspreset.c new file mode 100644 index 0000000000..519dd2886a --- /dev/null +++ b/c/src/lib/libbsp/mips/malta/startup/bspreset.c @@ -0,0 +1,35 @@ +/** + * @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.com/license/LICENSE. + */ + +#include <rtems.h> + +void bsp_reset(void); + +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; +} |