Page 1 of 1
Restarting
Posted: Wed Sep 24, 2008 12:15 am
by Love4Boobies
What needs to be done in order to restart the machine? Probably jumping back to real mode and executing POST? Am I far from it?
Re: Restarting
Posted: Wed Sep 24, 2008 1:14 am
by 01000101
you could invoke a triple-fault to make the machine reboot.
Re: Restarting
Posted: Wed Sep 24, 2008 1:56 am
by Love4Boobies
What's the standard way? A triple fault sounds like a hack

Re: Restarting
Posted: Wed Sep 24, 2008 2:11 am
by egos
Update the reset word in BDA with 1234h and pulse bit 0 of keyboard controller output port with 0b using the command 0FEh.
Re: Restarting
Posted: Wed Sep 24, 2008 2:13 am
by Stevo14
Try the
keyboard controller.
EDIT: egos beat me to it.

Re: Restarting
Posted: Wed Sep 24, 2008 2:24 am
by pcmattman
Except, a triple fault will always work. If the keyboard controller doesn't support that command, it won't work.
You could also use ACPI.
Re: Restarting
Posted: Wed Sep 24, 2008 2:46 am
by Love4Boobies
How does say, windows or linux do it?
Re: Restarting
Posted: Wed Sep 24, 2008 3:01 am
by egos
Love4Boobies wrote:How does say, windows or linux do it?
I hope that now they both use ACPI.
Re: Restarting
Posted: Wed Sep 24, 2008 3:59 am
by AJ
Hi,
I would suggest trying a few things in order - if ACPI is present use that, if not, fall back on the keyboard controller. If that doesn't work, you can either triple-fault or display a message saying "It is now safe to reset / shutdown..." as Windows used to on older PC's (in the days of Windows 95, I think it exclusively used that method when you selected the shutdown command).
Cheers,
Adam
Re: Restarting
Posted: Wed Sep 24, 2008 4:42 am
by Solar
Knoppix for example still does it that way to give you a chance to remove the CD / DVD before reboot.
Re: Restarting
Posted: Wed Sep 24, 2008 4:50 am
by AJ
Of course, if you don't mind annoying your users you open the CD drawer at the start of the shutdown procedure, close it at the end and with a fast shutdown you can trap the user's fingers in the CD tray

Re: Restarting
Posted: Wed Sep 24, 2008 5:11 am
by ru2aqare
AJ wrote:Of course, if you don't mind annoying your users you open the CD drawer at the start of the shutdown procedure, close it at the end and with a fast shutdown you can trap the user's fingers in the CD tray

Yeah... Most CD or DVD drives will try to eject the tray if they detect that it cannot be fully closed. But that's not the point
Anyway, some VMware implementations will complain if you use a triple fault to reboot the machine. I would only use it as a last resort.
Re: Restarting
Posted: Wed Sep 24, 2008 5:42 am
by Love4Boobies
Anyway, of all things, what does the keyboard controller have to do with anything? Does it assert some signal to the CPU to restore it to its initial state (and therefore because of CS:IP control will be passed to the BIOS initialization code)?
I presume they had another extra pin around the 8042 and decided to use that, just like with A20

Re: Restarting
Posted: Wed Sep 24, 2008 6:24 am
by Solar
You want Ctrl - Alt - Del to work when the OS hangs or not?

Re: Restarting
Posted: Wed Sep 24, 2008 7:02 am
by ru2aqare
Love4Boobies wrote:Anyway, of all things, what does the keyboard controller have to do with anything? Does it assert some signal to the CPU to restore it to its initial state (and therefore because of CS:IP control will be passed to the BIOS initialization code)?
That is correct. The keyboard controller on the motherboard has a reset CPU command. It pulls down the RESET# line of the processor or something.