# Linux Device Driver References - ACPI Tables
[TOC]
## Terminologies
### ACPI

ACPI is a specification that set the rules of the communication between the platform firmware and the operating system. The ACPI tells the platform firmware (or BIOS, informally) how to provide the operating system with information necessary to handle the platform or devices on the platform. On the other hand, it tells the operating system how to use the information. This allows a single binary (e.g. operating system image) to run on different platforms.
### ACPI Namespaces
==An *ACPI namespace* is a tree of tables==. The topology of the tree is supposed to reflect the hardware topology of the platform according to their dependent relationship.

### The RSDP
The root of this structure is called *Root Systmem Description Pointer*, or *RSDP*. It will be provided to the operating system by UEFI. RSDP contains pointers to a static table called *Extended System Description Table*. This table contains pointers to all the other tables. After getting this RSDP, the operating system can discover all the other tables in the ACPI.
### ACPI Methods
A table can be either *static* or *dynamic*. A dynmaic table additional holds sequence of instructions called *ACPI methods*. The BIOS through the ACPI namespace could tell the operating system what to do to get specific goal. DSDT is one of the example of dynamics table.
### AML and ASL

The components mentioned are encoded in a special language called *ACPI Machine Language*, or AML. The machine in its name suggests that it’s not for human. Indeed, it’s binary instead. There’s another language, which is the source language for AML called *ACPI Source Language*, or ASL. The BIOS author uses it to write the methods that are then compiled into AML, and the AML can be put into ACPI table in the BIOS.
It also works other way around. If you have AML, you can use disassembler to generate ASL for it. It is sometimes useful for debugging.
## References
### [ACPI from scratch: U-Boot implementation](https://youtu.be/46JmzxVLxFQ)
{%youtube 46JmzxVLxFQ %}
### [Kernel Recipes 2015 - Representing device-tree peripherals in ACPI - by David Woodhouse](https://youtu.be/p7MoTngjMcI)
{%youtube p7MoTngjMcI %}
### [LVC21F 304 ACPI overlays for embedded devices (00:04:00 ~ )](https://youtu.be/2Epfbg6h91g&t=241)
{%youtube 2Epfbg6h91g %}
### [Collaboration Summit 2013 - Implementing ACPI 5 Features Device Enumeration and PM (00:00:40 ~ 00:08:31)](https://youtu.be/iUcGyfCoZTE?si=S09HhF13Vgd7EpWK&t=40)
{%youtube iUcGyfCoZTE %}