diff options
author | Daniel Thompson <daniel.thompson@linaro.org> | 2014-03-28 09:28:11 +0000 |
---|---|---|
committer | Daniel Thompson <daniel.thompson@linaro.org> | 2015-12-14 16:43:44 +0000 |
commit | 17c90f0d0234beebe42fa92b339dd4b3c93af1ef (patch) | |
tree | a680b560926acc9d670825df0d0d59ffa2e10dea /lib | |
parent | 9f9499ae8e6415cefc4fe0a96ad0e27864353c89 (diff) |
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 <daniel.thompson@linaro.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig.debug | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 8c15b29d5adc..87c756709559 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -382,6 +382,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 |