lkml.org 
[lkml]   [1996]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: rebooting
Date
>> 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.
>
> Actually, this should work fine on any x86 machine - I guess this will
> cause the processor to enter shutdown mode (stack fault trying to run
> on an invalid stack), which on any machine I have come across causes
> reboot. Of course on a machine that was designed properly it would drop
> you into a rom monitor, like on a Sun or a Dec, but we are talking PCs
> here after all....
>
> Currently this works because we don't use a separate task for handling
> stack exceptions (by using a separate task it is possible to have a
> stack kept aside for the exception handler). This approach will fail
> if this changes.

The exception handler can detect the situation I think. Then it just
sets things up right and repeats the procedure. Alternately, disable
the exception handler first.

> Note that this causes a cold rather than warm reboot, so we don't
> ususally want to do this, but it could be useful to attempt to do
> a warm boot, and if we are still running say 1 second later try this
> approach.
>
> Does this sound reasonable?

Yes.

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