From 8d656f055800a15a6723af1f4782d93180d40350 Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Fri, 28 Mar 2014 09:28:11 +0000 Subject: serial: Emulate break using control characters Currently the magic SysRq functions are accessed by sending a break. Unfortunately some networked serial proxies makes is difficult to send a break meaning SysRq functions cannot be reached. We avoid this problem by allowing the (fairly unlikely) sequence of ^B^R^K characters to emulate a real break. This approach is very nearly as robust as normal sysrq/break handling because all trigger recognition happens during interrupt handling however to emulate a break we must enter the ISR four times (instead of twice) and manage an extra byte of state. Signed-off-by: Daniel Thompson --- lib/Kconfig.debug | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lib/Kconfig.debug') diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index a28590083622..bcd9cf52de21 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -345,6 +345,21 @@ config MAGIC_SYSRQ_DEFAULT_ENABLE This may be set to 1 or 0 to enable or disable them all, or to a bitmask as described in Documentation/sysrq.txt. +config MAGIC_SYSRQ_BREAK_EMULATION + bool "Enable magic SysRq serial break emulation" + depends on MAGIC_SYSRQ && SERIAL_CORE_CONSOLE + default n + help + If you say Y here, then you can use the character sequence ^B^R^K + to simulate a BREAK on the serial console. This is useful if for + some reason you cannot send a BREAK to your console's serial port. + For example, if you have a serial device server that cannot + send a BREAK. Enabling this feature can delay the delivery of + characters to the TTY because the ^B and a subsequent ^R will be + delayed until we know what the next character is. + + If unsure, say N. + config DEBUG_KERNEL bool "Kernel debugging" help -- cgit v1.2.3