Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Jan 1995 16:18:37 -0500
From:      Garrett Wollman <wollman@halloran-eldar.lcs.mit.edu>
To:        Jeff Aitken <jaitken@csugrad.cs.vt.edu>
Cc:        root@io.cts.com (Morgan Davis), hackers@freebsd.org
Subject:   Re: Machine state after reboot?
Message-ID:  <9501042118.AA04161@halloran-eldar.lcs.mit.edu>
In-Reply-To: <199501042008.PAA23435@csugrad.cs.vt.edu>
References:  <199501041005.CAA09168@io.cts.com> <199501042008.PAA23435@csugrad.cs.vt.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Wed, 4 Jan 1995 15:08:38 -0500 (EST), Jeff Aitken <jaitken@csugrad.cs.vt.edu> said:

> I'm not really sure how the x86 hardware works - what's the difference
> betewwn Ctl-Alt-Del and pushing the power button?

Quite a lot.  The BIOS traps C-A-D and then sends a signal to the
keyboard controller, which uses a spare line on one of its I/O ports
to pull down the hardware reset line, which (depending on the design
of the system) may or may not get propagated to the ISA bus reset
line.  Pushing the power button actually kills the power to
everything.

> Also, when
> Freebsd halts and says 'press any key to reboot' or whatever, is it
> doing the same thing as ctl-alt-del?

No.  What FreeBSD does is zero the page tables and then do a TLB
invalidate.  This causes a page directory fault on the next
instruction, but since the page-fault handler is no longer mapped
(thus causing another page fault), the double-fault handler is
invoked, but since we don't provide one & it wouldn't be mapped if it
were, the CPU triple-faults and resets itself.  This does not perform
a reset of any of the hardware in the machine, which doing it
``properly'' might or might not do.  Unfortunately, the keyboard
controller hack doesn't work on all machines (although it is supposed
to), and so WFJ (yes, this is his doing) went this route instead.

> I've noticed problems after this
> too when I reboot, say, DOS.

There are hooks in place to provide a run-down of all configured
device drivers.  However, the run-down code is not implemented
(primarily because the driver authors mostly have not updated their
drivers to get the status flag correct), so some devices can be left
in funny states.  See dev_goawayall() in kern/kern_devconf.c for more
information.

-GAWollman

--
Garrett A. Wollman   | Shashish is simple, it's discreet, it's brief. ... 
wollman@lcs.mit.edu  | Shashish is the bonding of hearts in spite of distance.
Opinions not those of| It is a bond more powerful than absence.  We like people
MIT, LCS, ANA, or NSA| who like Shashish.  - Claude McKenzie + Florent Vollant



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9501042118.AA04161>