Reseting or Power off the PC
Reseting or Power off the PC
Does any one know how to reset or power off an PC that doesn't support ACPI? for example Bochs.
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.
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.
The precursor of ACPI was APM. Before that, any such feature was system-specific, IIRC.
Every good solution is obvious once you've found it.
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Re: Reseting or Power off the PC
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)keller wrote:
Does any one know how to reset or power off an PC that doesn't support ACPI? for example Bochs.
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..
I hope you don't lose your eyesight reading this, but here's the specification for acpi. May be helpful.
http://www.acpi.info/DOWNLOADS/ACPIspec30b.pdf
This also might tell you about Intels implementation of ACPI-CA:
http://developer.intel.com/technology/i ... nloads.htm
The second link actually has utilities, that may help you. But I've never done anything with ACPI, so...good luck.
http://www.acpi.info/DOWNLOADS/ACPIspec30b.pdf
This also might tell you about Intels implementation of ACPI-CA:
http://developer.intel.com/technology/i ... nloads.htm
The second link actually has utilities, that may help you. But I've never done anything with ACPI, so...good luck.
Re: Reseting or Power off the PC
Ask the user to press the power button?keller wrote:
Does any one know how to reset or power off an PC that doesn't support ACPI? for example Bochs.
Re: Reseting or Power off the PC
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.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)
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Re: Reseting or Power off the PC
You know I've never seen a Pentium 2 in an AT form factor!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.
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.)
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!
Mike
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!
Mike
Code: Select all
inline void reboot()
{
volatile unsigned char good = 0x02;
while ((good & 0x02) != 0)
good = inportb(0x64);
outportb(0x64, 0xFE);
}
Re: Reseting or Power off the PC
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)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..)
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 bochsYou 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.)