source: rtems/c/src/lib/libbsp/powerpc/shared/console/bspreset.c @ 788870e

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

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

  • shared/console/inch.c, shared/startup/panic.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.
  • shared/console/bspreset.c: New file.
  • shared/console/reboot.c: Removed.
  • Property mode set to 100644
File size: 723 bytes
Line 
1/* $Id$ */
2
3#include "console.inl"
4#include <rtems/bspIo.h>
5#include <libcpu/stackTrace.h>
6
7/*-------------------------------------------------------------------------+
8|         Function: bsp_reset
9|      Description: Reboot the PC.
10| Global Variables: None.
11|        Arguments: None.
12|          Returns: Nothing.
13+--------------------------------------------------------------------------*/
14void bsp_reset(void)
15{
16  printk("Printing a stack trace for your convenience :-)\n");
17  CPU_print_stack();
18  /* shutdown and reboot */
19#if defined(BSP_KBD_IOBASE)
20  kbd_outb(0x4, 0xFE);      /* use keyboard controler to do the job... */
21#endif
22#if defined(mvme2100)
23  *(unsigned char*)0xffe00000 |= 0x80;
24#endif
25} /* bsp_reset */
Note: See TracBrowser for help on using the repository browser.