[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

SysRq on a serial line (was: Re: stop-a)

On Wed, 24 Nov 2004 foo_bar_baz_boo-deb@yahoo.com wrote:

The scan code by which Magic SysRq can be activated is hackable. Please
have a look at linux/Documentation/sysrq.txt (or whereever it is in
there) to find out how to alter the scancodes in the SysRq driver.

On a serial line things are slightly more complicated: request to switch to the SysRq mode is performed by sending a break (that is, dropping the line to low for some time). This is detected by the serial port driver and should be handled appropriately. The problem is that on Sparc the same signal is used to drop the user into PROM console (equivalent of pressing Stop-A on the keyboard). I've "fixed" the sunzilog serial driver in 2.6 kernel, so that SysRq is recognized, but it is not very elegant solution: you still get to the PROM console on break, but after exiting it (with a 'go' command), it switches to SysRq mode and gives you 5 seconds to press one of the SysRq magic keys. The kernel-image deb with these changes is available at http://www.wooyd.org/debian/sysrq/. Note that this package is for sparc32 machines, and will only work for those with sunzilog serial ports. I'm not done with it yet, since there are some quirks, like SysRq does not work when Stop-A is disabled using /proc or sysctl.

Best regards,

Jurij Smakov                                        jurij@wooyd.org
Key: http://www.wooyd.org/pgpkey/                   KeyID: C99E03CC

Reply to: