3 ms·
ACPI is powered by a Turing-complete programming language. It compiles to the ACPI Machine Language, which is an assembly language executed on the ACPI virtual
by segfaultbuserr 7y ago
ACPI is powered by a Turing-complete programming language. It compiles to the ACPI Machine Language, which is an assembly language executed on the ACPI virtual machine, a.k.a. the ACPI interpreter. The power management actions are actually the result of executing the living code. The justification is that it enables a lot of flexibility to adopt ACPI on different types hardware, without the limitation of being purely a configuration file. Also, the complicated power management code can be operated by the OS kernel, without writing any specific driver or calling into BIOS.
Naturally its power faced a lot of criticisms. Technically, you can decide what your power button does based on the next digit of pi. This is why Mark Shuttleworth called ACPI a Trojan horse and Linus Torvalds called ACPI brain-damaged.
Broken power management is often the result of low code quality. In the Hackintosh community (and Linux to a less extent), discompiling the DSDT table and manually fixing all the compiler warnings and bugs in the code is a critical step to get proper power management running.