4.104.114.84.95
Line | |
---|
1 | /*-------------------------------------------------------------------------+ |
---|
2 | | exit.c - ARM BSP |
---|
3 | +--------------------------------------------------------------------------+ |
---|
4 | | Routines to shutdown and reboot the BSP. |
---|
5 | +--------------------------------------------------------------------------+ |
---|
6 | | |
---|
7 | | Copyright (c) 2000 Canon Research Centre France SA. |
---|
8 | | Emmanuel Raguet, mailto:raguet@crf.canon.fr |
---|
9 | | |
---|
10 | | The license and distribution terms for this file may be |
---|
11 | | found in found in the file LICENSE in this distribution or at |
---|
12 | | http://www.rtems.com/license/LICENSE. |
---|
13 | | |
---|
14 | +--------------------------------------------------------------------------*/ |
---|
15 | |
---|
16 | #include <stdio.h> |
---|
17 | #include <bsp.h> |
---|
18 | #include <rtems/bspIo.h> |
---|
19 | #include <rtems/libio.h> |
---|
20 | |
---|
21 | void rtemsReboot (void) |
---|
22 | { |
---|
23 | asm volatile ("b _start"); |
---|
24 | } |
---|
25 | |
---|
26 | void bsp_cleanup(void) |
---|
27 | { |
---|
28 | unsigned char ch; |
---|
29 | static char line[]="\nEXECUTIVE SHUTDOWN! Any key to reboot..."; |
---|
30 | /* |
---|
31 | * AT this point, the console driver is disconnected => we must |
---|
32 | * use polled output/input. This is exactly what printk |
---|
33 | * does. |
---|
34 | */ |
---|
35 | printk("\n"); |
---|
36 | printk(line); |
---|
37 | ch = BSP_poll_char(); |
---|
38 | rtemsReboot(); |
---|
39 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.