ACPI: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
Columbus (talk | contribs)
m Added section "Forum Links"
m Bot: Replace deprecated source tag with syntaxhighlight
 
(8 intermediate revisions by 6 users not shown)
Line 1:
{{ACPI}}
 
ACPI (Advanced Configuration and Power Interface) is a [[:Category:Power management|Power Management]] and configuration standard for the PC, developed by Intel, Microsoft and Toshiba. ACPI allows the operating system to control the amount of power each device is given (allowing it to put certain devices on standby or power-off for example). It is also used to control and/or check thermal zones (temperature sensors, fan speeds, etc), battery levels, PCI IRQ routing, CPUs, NUMA domains and many other things.
 
Line 9 ⟶ 11:
To begin using ACPI, the operating system must look for the RSDP (Root System Description Pointer). This is covered in [[RSDP]] because it is too verbose to put here.
 
If the RSDP is found and the verification is valid, it contains a pointer to the [[RSDT]] (Root System Description Table) and for newer versions of ACPI (ACPI 2.0 and later) there is an additional XSDT (eXtended System Description Table). Both the RSDT and the XSDT contain pointers to other tables. The only real difference between the RSDT and the XSDT is that the XSDT contains 64 bit pointer instead of 32 bit pointers.
 
For the run time part of ACPI the main table to detect is the FADT (Fixed ACPI Description Table) as this contains information needed to enable ACPI.
Line 17 ⟶ 19:
== Switching to ACPI Mode ==
 
On some PCs, this is already done for you if....
 
* the smiSMI command field in the FADT is 0
* the ACPI enable and ACPI disable fields in the FADT are both 0
* bit 0 (value 1) of the PM1a control block I/O port is set
 
Otherwise, write the value of the ACPI Enable field into the register number pointed to by the smi command field, like so:
 
<syntaxhighlight lang="c">
outb(fadt->smi_command,fadt->acpi_enable);
 
</syntaxhighlight>
Linux waits 3 seconds for the hardware to change modes.
Then poll the PM1a control block until bit 0 (value 1) sets. When this bit is set, it means power management events are generating SCIs and not SMIs, which means your OS has to handle the events and the System Management BIOS isn't doing anything for you. The SCI is an IRQ that the FADT tells you about.
<syntaxhighlight lang="c">
while (inw(fadt->pm1a_control_block) & 1 == 0);
</syntaxhighlight>
 
== See Also ==
=== Articles ===
* [[Shutdown]]
* [[ACPICA]]
* [[RSDP]]
* [[RSDT]]
 
=== Forum Links ===
* [[Topic:16990|ACPI Shutdown code with good explanation in C]]
=== External Links ===
* [https://uefi.org/sites/default/files/resources/ACPI_6_3_final_Jan30.pdf ACPI Specification]
* [http://www.acpi.info/ Official ACPI homepage]
 
[[Category:ACPI]]