How to shut down the PC with ACPI???
How to shut down the PC with ACPI???
For reseting I know you can use the values from the FADT table,
Like this:
_outp( FADT.RESET_REG.register, FADT.RESET_VALUE );
But how do you shut down the PC???
Re: How to shut down the PC with ACPI???
Hi,
AFAIK there's AML code (ACPI Machine Language - the byte-code for an interpretted OOP language called ASL or ACPI Source Language) provided by the firmware. This AML code is in the DSDT (and possibly other tables).
Within this code there's a function to enter different sleep states. S1 to S3 are normal sleep states, but there's also S0 (running/normal), S4 (hibernate) and S5 (soft off). You'd want to use this function to move to the S5 sleep state...
Notes:
Brendan
AFAIK there's AML code (ACPI Machine Language - the byte-code for an interpretted OOP language called ASL or ACPI Source Language) provided by the firmware. This AML code is in the DSDT (and possibly other tables).
Within this code there's a function to enter different sleep states. S1 to S3 are normal sleep states, but there's also S0 (running/normal), S4 (hibernate) and S5 (soft off). You'd want to use this function to move to the S5 sleep state...
Notes:
- I'm sure it's not as simple as intepretting a function (don't be surprised if the computer needs to be in a certain state or if it relies on more of ACPI than just setting a sleep state).
Don't be surprised if it doesn't work because of BIOS bugs (especially on older BIOSs)
I've never used ACPI's ASL or AML - every time I try to look at it my eyes bleed.
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.