Reboot Question

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
linux

Reboot Question

Post by linux »

hey,
what are the possible ways of rebooting a system from the pmode? and how does the system reboot by sending 0xFE to the keyboard port 0x64 ?

thnkz
Tim

Re:Reboot Question

Post by Tim »

linux wrote: what are the possible ways of rebooting a system from the pmode?
-- Use the keyboard controller, as you mentioned. This always works.
-- Trigger a deliberate triple fault (e.g. LIDT 0/INT 0). This works on most chipsets, but some motherboards hang on a triple fault.
-- printf("Please press the reset button\n"); :)
and how does the system reboot by sending 0xFE to the keyboard port 0x64 ?
The keyboard controller asserts the CPU's RESET line. The keyboard controller doesn't need to be able to reboot the computer, but it was probably easier to put the reset logic into the keyboard controller than use a separate chip.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Reboot Question

Post by Pype.Clicker »

one thing that is often misunderstood is that the keyboard do never see the command you sent to reboot ... (nah, it's not handled by faking a CTRL+ALT+DEL combo ... sorry)

the 8042 chip is actually a controller chip burried in your motherboard chipset that communicates through a serial line with the keyboard (and also with the PS/2 mouse, as you'll discover on your Journey is the land of OS) ...

It has also -- for historic reasons -- the role to replace another I/O circuitry that was controlling several things in the PC motherboards, like gating the 20th bit of address lines, or pulsing the #RESET line of the CPU ...
User avatar
Neo
Member
Member
Posts: 842
Joined: Wed Oct 18, 2006 9:01 am

Re:Reboot Question

Post by Neo »

is this the right way to reboot or should we go to v86 and issue int15h?
Only Human
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Reboot Question

Post by Pype.Clicker »

it is a good way to reboot. The difference with INT15h (provided that it works under VM86, which i'm not certain of) is that pulsing the #RESET line should result in a cold reboot while INT 15h will (or can) do a warm reboot, iirc...
however, i'm unsure if warm reboot are still desirable nowadays. moreoeve, using the #RESET line usually reset hardware like pci cards, chipset etc. Whether warm reboots does this aswell or not depends on your BIOS ...
frank

Re:Reboot Question

Post by frank »

make a bad protected mode to realmode switch or opposite, this always works ;)
Although I'm not sure if this is bad for the hardware?
Post Reply