forked from Imagelibrary/rtems
2003-02-20 Till Straumann <strauman@slac.stanford.edu>
PR 349/bsps * console/console.c, console/uart.c, console/uart.h: implement IOCTLs for the serial (UART) console to install/retrieve a BREAK-IRQ callback. The callback routine (if installed) is invoked from the UART ISR when a BREAK interrupt is detected. This can be used e.g. to enforce a "hotkey" reboot a la vxWorks Ctrl-X (although we use the serial line break condition) NOTE: The callback runs in ISR context.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
/* $Id$ */
|
||||
|
||||
#include "console.inl"
|
||||
#include <rtems/bspIo.h>
|
||||
#include <libcpu/stackTrace.h>
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Function: rtemsReboot
|
||||
@@ -11,6 +13,8 @@
|
||||
+--------------------------------------------------------------------------*/
|
||||
void rtemsReboot(void)
|
||||
{
|
||||
printk("Printing a stack trace for your convenience :-)\n");
|
||||
CPU_print_stack();
|
||||
/* shutdown and reboot */
|
||||
kbd_outb(0x4, 0xFE); /* use keyboard controler to do the job... */
|
||||
} /* rtemsReboot */
|
||||
|
||||
Reference in New Issue
Block a user