source: rtems/c/src/lib/libbsp/arm/gp32/startup/bspreset.c @ bf7e13f

4.104.115
Last change on this file since bf7e13f was bf7e13f, checked in by Joel Sherrill <joel.sherrill@…>, on 09/22/08 at 21:49:21

2008-09-22 Joel Sherrill <joel.sherrill@…>

  • 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 the various bsp_cleanup() implementations which had their own implementation and variety of string constants.
  • startup/bspreset.c: New file.
  • startup/bspclean.c: Removed.
  • Property mode set to 100644
File size: 977 bytes
Line 
1/*
2 *  The license and distribution terms for this file may be
3 *  found in found in the file LICENSE in this distribution or at
4 *  http://www.rtems.com/license/LICENSE.
5 *
6 *  $Id$
7 */
8
9#include <bsp.h>
10
11void bsp_reset(void)
12{
13  rtems_interrupt_level level;
14  rtems_interrupt_disable(level);
15  /* disable mmu, invalide i-cache and call swi #4 */
16  asm volatile(""
17    "mrc    p15,0,r0,c1,c0,0  \n"
18    "bic    r0,r0,#1          \n"
19    "mcr    p15,0,r0,c1,c0,0  \n"
20    "nop                      \n"
21    "nop                      \n"
22    "nop                      \n"
23    "nop                      \n"
24    "nop                      \n"
25    "mov    r0,#0             \n"
26    "MCR    p15,0,r0,c7,c5,0  \n"
27    "nop                      \n"
28    "nop                      \n"
29    "nop                      \n"
30    "nop                      \n"
31    "nop                      \n"
32    "swi    #4                "
33    :
34    :
35    : "r0"
36  );
37  /* we should be back in bios now */
38}
Note: See TracBrowser for help on using the repository browser.