From: ajc@pa.dec.com (AJ Casamento)
Subject: Re: Halting a DECstation via BREAK
Organization: Digital Equipment Corporation
	<1992Jul17.184916.24625@uwm.edu> <1992Jul17.213840.1809@cs.unca.edu>
Date: 22 Jul 92 19:21:19



In article <1992Jul17.213840.1809@cs.unca.edu> brock@cs.unca.edu (J. Dean 
Brock) writes:



>> In article <1992Jul17.184916.24625@uwm.edu>, dave@opus.csd.uwm.edu (Dave 
>> Rasmussen) writes:
>> |>Doesn't CTRL ALT COMPOSE or CTRL ALT BS do the same thing on a Personal
>> |>5000/xx consoles?  I heard it did but don't want to try it just now :-)

>> It's CTRL ALT DELETE.  It works on my DECstation 5000/25.
>> (I had to do it once.)  I think it's odd that only works from
>> a terminal plugged into the serial port.


Folks,

  I had thought that there was more to this, so I asked one of my colleagues
who had done some of the base system work for ACCESS.bus on the DS5000/xx.
The following is Mark's reply to my inquiry. 

I hope that it helps.

				Thanx,
				  AJ

      **********************************************************************
      * AJ Casamento			"The question is not whether or    *
      * Digital's TRI/ADD Program	 not the opinions are mine; but    *
      * 529 Bryant Ave. PAG-2		 rather, which of my personalities *
      * Palo Alto, CA 94301-1616	 do they belong to?"		   *
      * 415.617.3460							   *
      * ajc@decwrl.dec.com						   *
      **********************************************************************


Mark's reply:


There are several options in keybd `hot-key' behaviour, so first I'll
tell you what the _default_ behaviour is, and then how to change it.


Hot Key (keybd chord)		Function Name	Effect (by default)
---------------------		-------------	-------------------
CTRL LEFT_ALT <X]   		System RESET	reset CPU if system is "hung"

CTRL LEFT_ALT RETURN		Debug HALT	immed. return to boot firmware

CTRL LEFT_ALT LEFT_SHIFT <X]	ATTENTION	ignored


Notes: "<X]" is aka the "delete" key on the LK501 and LK521 keyboards.


We put a lot of thought into the meaning of "Reset" as applied to a
multitasking & multiuser workstation.  The traditional definition from
the PC world of RESET is instant, unconditional, complete
self-destruct.	In a multitasking, disk-caching system intended for
naive users, putting an Instant Self-Destruct on the keyboard seemed
too dangerous.	Ideally, RESET should only have an effect if the
system is "hung" (unresponsive); otherwise, it is ignored.
Implementation:	 when the RESET chord is pressed on the keyboard, the
system module's A.b controller starts a timer, and asks the kernel
device-driver if the system's okay.  If the kernel driver doesn't say
"I'm okay" before timeout (typically a few seconds), the A.b
controller asserts a hard-reset to the system module.

So, you should be able to hammer on CTRL-(left)ALT-<X] without
any effect (unless the system's hung)... I'm even very careful to not lose
the CTRL, ALT, and <X] keystrokes, so the chord can be interpreted by
higher-level software (I have it mapped to cause my Window Mgr to exit,
which logs me out :-)

We also recognized that kernel hackers occasionally need to purposely
"crash" the system--this is where Debug HALT comes in.	When pressed,
it causes an immediate return to firmware.  Hopefully, some CPU state
(PC, SP) can be preserved for analysis.	 On the DS5000/xx this is
implemented via a high-priority interrupt (rather than CPU reset), so
it is conceivable that this might not work.  The DS5000/100 series has
the same "problem" with it's backpanel reset button.  IMHO, this should be
disabled (i.e. have no effect) by default.

ATTENTION is generated by the LK501 and '521, but by default is simply
ignored by the DS5000/xx system module (tho' this can be changed).

This table applies to both the LK501 and LK521 (Short or "Un*x")
keyboards, but it is possible that other keyboards (such as a
hypothetical PC 101-key keybd), in the interests of compatibility,
could map different chords or sequences to these functions.  There is
actually a two-level mapping going on, from `hot-key' to internal
ACCESS.bus Signal message (done by the keybd), then from A.b Signal
message to function (done by system's A.b controller and
device-driver).	 The DS5000/xx system module is only concerned with
the A.b Signal messages--NOT with the actual key.  In fact, there is
nothing to prevent a non-keyboard device from sending Signal messages
to the system module.

So far, I've only talked about default behaviour.  The (apparently
undocumented) utility "setrah" (Set Reset Halt Attn) can be used to
view/change settings.

% /etc/setrah -H
setrah: usage: setrah [-r|-a|-h|+r|+a|+h|-d[ ]value]
	-r	RESET signal is ignored
	+r	RESET signal causes complete host reset
	-a	ATTN does not cause host reset
	+a	ATTN causes host reset
	-h	HALT signal ignored
	+h	HALT signal causes jump into console ROM
	-d[ ]value	indicates how many seconds to wait before hard reset
		where value is one of 0, 1, 5, or 10 seconds

	Default is +h +r -d5 (any options modify this default --
	it is always used as a base.)

+/-a enables/disables the ATTENTION key-chord to initiate a System RESET.
+/-r enables/disables the RESET key-chord to initiate a System RESET.

To disable all hot-keys:  setrah -rah
To enable Instant Self-Destruct on C-A-DEL:  setrah +r -d0
(i.e. pressing C-A-DEL will now ALWAYS perform a hard reset).


Xref: sparky comp.sys.dec:4255 vmsnet.pdp-11:570