ACPI: Difference between revisions

36 bytes added ,  26 days ago
m
Bot: Replace deprecated source tag with syntaxhighlight
[unchecked revision][unchecked revision]
m (Add ACPI component)
m (Bot: Replace deprecated source tag with syntaxhighlight)
 
Line 27:
Otherwise, write the value of the ACPI Enable field into the register number pointed to by the smi command field, like so:
 
<sourcesyntaxhighlight lang="c">
outb(fadt->smi_command,fadt->acpi_enable);
</syntaxhighlight>
</source>
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.
<sourcesyntaxhighlight lang="c">
while (inw(fadt->pm1a_control_block) & 1 == 0);
</syntaxhighlight>
</source>
 
== See Also ==