Introduction to Linux acpi off

Source: Internet
Author: User

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:
 

 
 
  1. Scope (_SB.PCI0.LPC)  
  2. {  
  3. OperationRegion (LPCS, PCI_Config, 0x00, 0x0100)  
  4. Field (LPCS, AnyAcc, NoLock, Preserve)  
  5. {  
  6. Offset (0x60),  
  7. PIRA, 8,  
  8. }  
  9. }  
  10. Device (LNKA)  
  11. {  
  12. Method (_DIS, 0, NotSerialized)  
  13. {  
  14. Or (\_SB.PCI0.LPC.PIRA, 0x80, \_SB.PCI0.LPC.PIRA)  
  15. }  
  16. }  

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.


 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.