1 | /*-------------------------------------------------------------------------+ |
---|
2 | | exit.c v1.1 - PC386 BSP - 1997/08/07 |
---|
3 | +--------------------------------------------------------------------------+ |
---|
4 | | Routines to shutdown and reboot the PC. |
---|
5 | +--------------------------------------------------------------------------+ |
---|
6 | | (C) Copyright 1997 - |
---|
7 | | - NavIST Group - Real-Time Distributed Systems and Industrial Automation |
---|
8 | | |
---|
9 | | http://pandora.ist.utl.pt |
---|
10 | | |
---|
11 | | Instituto Superior Tecnico * Lisboa * PORTUGAL |
---|
12 | +--------------------------------------------------------------------------+ |
---|
13 | | Disclaimer: |
---|
14 | | |
---|
15 | | This file is provided "AS IS" without warranty of any kind, either |
---|
16 | | expressed or implied. |
---|
17 | +--------------------------------------------------------------------------+ |
---|
18 | | This code is based on: |
---|
19 | | exit.c,v 1.2 1995/12/19 20:07:36 joel Exp - go32 BSP |
---|
20 | | With the following copyright notice: |
---|
21 | | ************************************************************************** |
---|
22 | | * COPYRIGHT (c) 1989-1998. |
---|
23 | | * On-Line Applications Research Corporation (OAR). |
---|
24 | | * Copyright assigned to U.S. Government, 1994. |
---|
25 | | * |
---|
26 | | * The license and distribution terms for this file may be |
---|
27 | | * found in found in the file LICENSE in this distribution or at |
---|
28 | | * http://www.OARcorp.com/rtems/license.html. |
---|
29 | | ************************************************************************** |
---|
30 | | |
---|
31 | | $Id$ |
---|
32 | +--------------------------------------------------------------------------*/ |
---|
33 | |
---|
34 | |
---|
35 | #include <stdio.h> |
---|
36 | #include <bsp.h> |
---|
37 | #include <rtems/libio.h> |
---|
38 | #include <pc386uart.h> |
---|
39 | |
---|
40 | void bsp_cleanup(void) |
---|
41 | { |
---|
42 | unsigned char ch; |
---|
43 | static char line[]="EXECUTIVE SHUTDOWN! Any key to reboot..."; |
---|
44 | /* |
---|
45 | * AT this point, the console driver is disconnected => we must |
---|
46 | * use polled output/input. This is exactly what printk |
---|
47 | * does. |
---|
48 | */ |
---|
49 | printk("\n"); |
---|
50 | printk(line); |
---|
51 | ch = BSP_poll_char(); |
---|
52 | rtemsReboot(); |
---|
53 | } |
---|
54 | |
---|
55 | |
---|
56 | |
---|
57 | |
---|
58 | |
---|
59 | |
---|
60 | |
---|
61 | |
---|