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.
Resetting is easy. Just provoke a triple fault.
The easiest way is to load an empty IDT and invoke an interrupt (or cause an exception).
Note that bochs or other VMs may pop up a message instead of resetting in certain configurations.
Powering down is not possible without hardware support AFAIK, so it may not be possible on all machines.
There may be more ways than ACPI, though. I don't know much about that so I'll let someone else answer that one.
keller wrote:
Does any one know how to reset or power off an PC that doesn't support ACPI? for example Bochs.
Quite a few older systems (386/486 and Pentium 1 systems) have really a "direct" power off switch. Usually the switch runs directly into the PSU and turns off the power supply directly. (Kinda like the power switch on the back of most modern PSU's)
In modern systems the front power switch connects to the motherboard using 2 little wires, And it's behaviour is usually configurable in the BIOS or Operating system.
Most new systems don't even power off entirely.. (Sometimes the Ethernet light for example can stay powered on). This allows such technologies as WOL to work..
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
Brynet-Inc wrote:
Quite a few older systems (386/486 and Pentium 1 systems) have really a "direct" power off switch. Usually the switch runs directly into the PSU and turns off the power supply directly. (Kinda like the power switch on the back of most modern PSU's)
I have a Pentium 2 system with such an arrangement. I'm not sure when exactly it died out, but it was with the transition from AT to ATX cases.
Well, power-on-LAN or power-on-Call or power-on-time are usefull services, and quite obviously not possible if the PSU is "hard disconnected". Unfortunately the electronics industry has still not mastered the art of "powerless standby"...
Every good solution is obvious once you've found it.
Jules wrote:I have a Pentium 2 system with such an arrangement. I'm not sure when exactly it died out, but it was with the transition from AT to ATX cases.
You know I've never seen a Pentium 2 in an AT form factor!
586-class socket 7 was the newest I've seen that used AT.. I did used to get annoyed during the AT to ATX transition though. Some motherboard manufactures actually started adding connectors for both PSU types. (For a short time..)
But yes, In short.. keller seems to be asking if it's possible to turn off these older systems without using the Hard power-off button. It's not possible.. Sorry
You certainly can make a Shutdown-like sequence though, Disable things and print a message like the evil Windows 95.
(It is now safe to turn off your computer.)
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
APM is pretty simple; it is actually very useful for QEMU so you can create a keyboard shortcut for power-off! It is not supported, however, on my Dell Latitude D820 laptop.
But if "without ACPI" includes "without APM", I'm afraid Brynet is right. About the best you can do is print out a "Please turn off your computer" message. Just do it in a better way than W95: A 640x240 bitmap stretched out to 640x480 saved as a .sys file instead of a .bmp file... Now that was pretty awful!
Brynet-Inc wrote:
You know I've never seen a Pentium 2 in an AT form factor!
586-class socket 7 was the newest I've seen that used AT.. I did used to get annoyed during the AT to ATX transition though. Some motherboard manufactures actually started adding connectors for both PSU types. (For a short time..)
yes, i have some slot 1 AT systems (though most support both AT/ATX power connecters, they can only support AT cases -- ATX changed not only the power connector, but also the position of the ports)
You certainly can make a Shutdown-like sequence though, Disable things and print a message like the evil Windows 95.
(It is now safe to turn off your computer.)
win95 does support auto-shut-down, and only displays that message if it doesnt have proper drivers, and the system doesnt support the 'default' APM method (this same is true of win98/XP -- both will display the same message as win95 does on some MBs (but not all) if you dont have the chipset drivers loaded) -- and win95 will shut down bochs