Restarting

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Restarting

Post 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?
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: Restarting

Post by 01000101 »

you could invoke a triple-fault to make the machine reboot.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Restarting

Post by Love4Boobies »

What's the standard way? A triple fault sounds like a hack :)
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
egos
Member
Member
Posts: 612
Joined: Fri Nov 16, 2007 1:59 pm

Re: Restarting

Post 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.
If you have seen bad English in my words, tell me what's wrong, please.
User avatar
Stevo14
Member
Member
Posts: 179
Joined: Fri Mar 07, 2008 3:40 am
Location: Arad, Romania

Re: Restarting

Post by Stevo14 »

Try the keyboard controller.

EDIT: egos beat me to it. :(
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Re: Restarting

Post 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.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Restarting

Post by Love4Boobies »

How does say, windows or linux do it?
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
egos
Member
Member
Posts: 612
Joined: Fri Nov 16, 2007 1:59 pm

Re: Restarting

Post by egos »

Love4Boobies wrote:How does say, windows or linux do it?
I hope that now they both use ACPI.
If you have seen bad English in my words, tell me what's wrong, please.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: Restarting

Post 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
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Restarting

Post by Solar »

Knoppix for example still does it that way to give you a chance to remove the CD / DVD before reboot.
Every good solution is obvious once you've found it.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: Restarting

Post 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 :twisted:
ru2aqare
Member
Member
Posts: 342
Joined: Fri Jul 11, 2008 5:15 am
Location: Hungary

Re: Restarting

Post 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 :twisted:
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.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Restarting

Post 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 :roll:
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Restarting

Post by Solar »

You want Ctrl - Alt - Del to work when the OS hangs or not? 8)
Every good solution is obvious once you've found it.
ru2aqare
Member
Member
Posts: 342
Joined: Fri Jul 11, 2008 5:15 am
Location: Hungary

Re: Restarting

Post 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.
Post Reply