Linux acpi off-the Advanced Configuration & Power Interface. ACPI is the abstraction layer between OS, BIOS, and hardware. It allows independent development of the OS and platform. For example, the new OS can control the old platform, and the old OS can also control the new platform without additional modifications.
ACPI register, which describes ACPI-related registers. OS can directly obtain information about these registers from the ACPI table, so you do not need to know the specific hardware configuration.
AML code, a type of C code. Provided by the BIOS, the AML interpreter of the OS is named ACPI CA in Linux) to explain and execute the code. This is the key to the ACPI abstraction layer, which will be described in detail below.
Configuration information. ACPI contains a lot of configuration information, such as multi-processor configuration information MADT), NUMA configuration information SRAT, SLIT), and high-precision timer HPET.
AML code is the key to abstraction. To eliminate platform relevance, BIOS uses the AML code to implement Platform-related operations. The operating system does not need to know the details of the platform. It only needs to explain and execute the Code. In the process of interpreting and executing the code, the platform-related operations are executed. The ACPI Specification defines some standard AML functions, and the OS can implement specific functions by performing such a standard function. For example:
- Scope (_SB.PCI0.LPC)
- {
- OperationRegion (LPCS, PCI_Config, 0x00, 0x0100)
- Field (LPCS, AnyAcc, NoLock, Preserve)
- {
- Offset (0x60),
- PIRA, 8,
- }
- }
- Device (LNKA)
- {
- Method (_DIS, 0, NotSerialized)
- {
- Or (\_SB.PCI0.LPC.PIRA, 0x80, \_SB.PCI0.LPC.PIRA)
- }
- }
For example, to disable the LNKA device, the Linux acpi off specification defines that the OS must execute the _ DIS function of the device. From the hardware point of view, to disable the LNKA device, you need to set the maximum position of the configuration space register of a PCI device to 0 × 60. The OS does not need to know the hardware details. It just needs to explain and execute the _ DIS function. The above code is the AML code, provided by the BIOS, with the 'Or (\ _ SB. PCI0.LPC. PIRA, 0 × 80, \ _ SB. PCI0.LPC. PIRA) 'is actually to register \ _ SB. PCI0.LPC. PIRA is the highest bit, and PIRA is the registers 0 × 60 in the configuration space of the PCI device LPC. From this code segment, we can clearly see that BIOS hides abstraction in the form of AML code) Hardware details, so that the OS can see a platform-independent hardware.
More Linux acpi off predefined functions can be found in the ACPI specification and can be downloaded from the http://www.acpi.info to the latest specification.
The AML interpreter used in Linux acpi off is ACPICA-the ACPI Component Architecture. It can be obtained from http://www.intel.com/policy/iapc/acpi/downloads.htm. It contains an AML interpreter. Linux kernel contains this interpreter. This is also true for many other operating systems, such as BSD and opensolaris). A compiler compiles ACPI Source Language ASL) into AML code) and some test tools.
The latest Linux acpi off code can use git in http://www.kernel.org/git? P = linux/kernel/git/lenb/linux-acpi-2.6.git get.