2009-08-09 Joel Sherrill <joel.sherrill@oarcorp.com>

* Makefile.am, configure.ac: Add Skyeye reset device.
	* startup/bspreset.c: New file.
This commit is contained in:
Joel Sherrill
2009-08-10 03:03:08 +00:00
parent d81bfed2af
commit 57bcaa29a7
4 changed files with 61 additions and 2 deletions

View File

@@ -1,3 +1,8 @@
2009-08-09 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Add Skyeye reset device.
* startup/bspreset.c: New file.
2009-07-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* configure.ac: Rename BSP_BOOTCARD_OPTIONS to

View File

@@ -31,7 +31,7 @@ libbsp_a_SOURCES =
# startup
libbsp_a_SOURCES += ../../shared/bsplibc.c ../../shared/bsppost.c \
../gp32/startup/bspstart.c ../../shared/bspclean.c \
../gp32/startup/bspreset.c startup/memmap.c \
startup/bspreset.c startup/memmap.c \
../../shared/bootcard.c ../../shared/sbrk.c \
../../shared/bsppretaskinghook.c \
../../shared/bsppredriverhook.c ../../shared/bspgetworkarea.c \

View File

@@ -18,8 +18,15 @@ RTEMS_PROG_CCAS
RTEMS_CHECK_NETWORKING
AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
RTEMS_BSPOPTS_SET([ON_SKYEYE],[*],[])
RTEMS_BSPOPTS_HELP([ON_SKYEYE],
[If defined, enable options which optimize executingon the Skyeye
simulator. Speed up the clock ticks while the idle task is running so
time spent in the idle task is minimized. This significantly reduces
the wall time required to execute the RTEMS test suites.])
RTEMS_BSP_BOOTCARD_OPTIONS
RTEMS_BSP_CLEANUP_OPTIONS(1, 1)
RTEMS_BSP_CLEANUP_OPTIONS(0, 1)
# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile])

View File

@@ -0,0 +1,47 @@
/*
* 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)
{
#if ON_SKYEYE == 1
#define SKYEYE_MAGIC_ADDRESS (*(volatile unsigned int *)(0xb0000000))
SKYEYE_MAGIC_ADDRESS = 0xff;
#else
/* XXX TODO this code is copied from gp32.. move it to a shared place */
rtems_interrupt_level level;
rtems_interrupt_disable(level);
/* disable mmu, invalide i-cache and call swi #4 */
asm volatile(""
"mrc p15,0,r0,c1,c0,0 \n"
"bic r0,r0,#1 \n"
"mcr p15,0,r0,c1,c0,0 \n"
"nop \n"
"nop \n"
"nop \n"
"nop \n"
"nop \n"
"mov r0,#0 \n"
"MCR p15,0,r0,c7,c5,0 \n"
"nop \n"
"nop \n"
"nop \n"
"nop \n"
"nop \n"
"swi #4 "
:
:
: "r0"
);
/* we should be back in bios now */
#endif
}