summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/shared/console/bspreset.c
blob: 706121d6b64a32a54909268cbb6187a714626c4b (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
26
27
28
29
/* $Id$ */

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

/*-------------------------------------------------------------------------+
|         Function: bsp_reset
|      Description: Reboot the PC.
| Global Variables: None.
|        Arguments: None.
|          Returns: Nothing.
+--------------------------------------------------------------------------*/
void bsp_reset(void)
{
  printk("Printing a stack trace for your convenience :-)\n");
  CPU_print_stack();
  /* shutdown and reboot */

#if defined(mvme2100)
  *(unsigned char*)0xffe00000 |= 0x80;
#else
   /* Memory-mapped Port 92 PIB device access
   *(unsigned char*)0x80000092 |= 0x01;
   */
   outb(1, 0x92);

#endif
} /* bsp_reset */