summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/shared/console/reboot.c
blob: cf5e378ef1a7063d6d8e88525c62524ab15e017d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* $Id$ */

#include "console.inl"
#include <rtems/bspIo.h>
#include <libcpu/stackTrace.h>

/*-------------------------------------------------------------------------+
|         Function: rtemsReboot
|      Description: Reboot the PC.
| Global Variables: None.
|        Arguments: None.
|          Returns: Nothing.
+--------------------------------------------------------------------------*/
void rtemsReboot(void)
{
  printk("Printing a stack trace for your convenience :-)\n");
  CPU_print_stack();
  /* shutdown and reboot */
#if defined(BSP_KBD_IOBASE)
  kbd_outb(0x4, 0xFE);      /* use keyboard controler to do the job... */
#endif
#if defined(mvme2100)
  *(unsigned char*)0xffe00000 |= 0x80;
#endif
} /* rtemsReboot */