lkml.org 
[lkml]   [1996]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: rebooting


On Mon, 30 Sep 1996, Albert Cahalan wrote:
>
> >> xor %esp,%esp
> >> inc %esp
> >> push %esp
> >>
> >> That works on every x86 machine we've tested it on, including his with
> >> the wacko keyboard controller, it's about as non-portable as it gets
> >> though, so I doubt its suitable for the actual kernel, you should try it
> >> in your machine, tho.

Note that Linux already does something that is equivalent to this, after
having tried the keyboard controller a few times (more like a hundred, if
I remember correctly). Anyway, if the keyboard controller doesn't do
anything to the kernel, the kernel will do something like this (from
memory, I'm too lazy to check):

lidt(null_idt);

which essentially zeroes out the exception table information. The next
interrupt that comes in will result in a triple fault, and shutdown. And on
most PC chips (all that I've seen) the shutdown line will lead to a reset..

But try out 2.1.0 first: that does a cold reset with the keyboard
controller as default, and it may turn out to work for you. If it
doesn't, you can test the alternative method by just ifdef'ing out the
keyboard controller reset code.

Linus

\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.037 / U:36.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site