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:
Joel Sherrill
2003-02-20 21:32:07 +00:00
parent d19443c71a
commit 4f3e4f33db
16 changed files with 257 additions and 80 deletions

View File

@@ -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 */