HardwareEnableWithDSDT

Revision 4 as of 2010-01-29 09:34:35

Clear message

Summary

This page is going to tell how to read DSDT/SSDT table and how it affects your system.

Overview of ACPI

*TBD*

Dump DSDT/SSDT

There are many ways to dump ACPI tables. The most easy way is to select and read out tables file from /sys/firmware/acpi/tables

user@here:~$ tree /sys/firmware/acpi/tables/
/sys/firmware/acpi/tables/
|-- APIC
|-- ATKG
|-- BOOT
|-- DBGP
|-- DSDT
|-- ECDT
|-- FACP
|-- FACS
|-- HPET
|-- MCFG
|-- OEMB
|-- SLIC
|-- SSDT
`-- dynamic
    |-- SSDT2
    |-- SSDT3
    |-- SSDT4
    `-- SSDT5

1 directory, 17 files

You can copy files out with root privilege and use iasl to decompile it

user@here:~$ sudo cp /sys/firmware/acpi/tables/DSDT ~/DSDT.bin
user@here:~$ sudo chown ikepanhc:ikepanhc /home/ikepanhc/DSDT.bin
user@here:~$ iasl -d ~/DSDT.bin 

Intel ACPI Component Architecture
AML Disassembler version 20090521 [Jun 30 2009]
Copyright (C) 2000 - 2009 Intel Corporation
Supports ACPI Specification Revision 3.0a

Loading Acpi table from file /home/user/DSDT.bin
Acpi table [DSDT] successfully installed and loaded
Pass 1 parse of [DSDT]
Pass 2 parse of [DSDT]
Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Parsing completed
Disassembly completed, written to "/home/user/DSDT.dsl"

Now, you can find your DSDT at /home/user/DSDT.dsl

Information from /sys

There are lots of ACPI devices described in DSDT/SSDT. DSDT/SSDT describes them in a tree form. The following is a simple example for the ACPI device tree.

user@here:~$ tree /sys/devices/LNXSYSTM\:00/
/sys/devices/LNXSYSTM:00/
|-- LNXCPU:00
|-- LNXCPU:01
|-- LNXPWRBN:00
|-- LNXTHERM:00
|   `-- LNXTHERM:01
`-- device:00
    |-- ATK0101:00
    |-- PNP0A08:00
    |   |-- ACPI0003:00
    |   |-- PNP0C02:00
    |   |-- PNP0C02:05
    |   |-- PNP0C0A:00
    |   |-- device:01
    |   |   |-- LEN0013:00
    |   |   |-- PNP0C04:00
    |   |   `-- PNP0C09:00
    |   |       `-- LEN0014:00
    |   |-- device:02
    |   |   |-- device:03
    |   |   |   |-- device:04
    |   |   |   `-- device:05
    |   |   |-- device:06
    |   |   |   |-- device:07
    |   |   |   `-- device:08
    |   |   |-- device:09
    |   |   |-- device:0a
    |   |   |-- device:0b
    |   |   `-- device:0c
    |   |-- device:0d
    |   |-- device:2f
    |   |   `-- device:30
    |   `-- device:31
    |       |-- device:32
    |       `-- device:33
    |-- PNP0C01:00
    |-- PNP0C0D:00
    |-- PNP0C0E:00
    |-- PNP0C0F:00
    |-- PNP0C0F:01
    |-- PNP0C0F:02
    |-- PNP0C0F:03
    |-- PNP0C0F:04
    |-- PNP0C0F:05
    |-- PNP0C0F:06
    `-- PNP0C0F:07

The folder name starts with "device" means that this device has no HID (Hardware ID). It's hard to bind a driver on it and execute its method, so we will ignore them.

The folder name starts with "PNP" or "ACPI" means that this device is generic ACPI device, not a machine specific device. When we are going to enable some special function, its not necessary to take a look.

The folder name starts with "LNX" mean some root devices, they do not need an HID we know exact what they are. In the above example, LNXSYSTM means \_SB (System Base), LNXPWRBN is the power butten device, LNXCPU is the CPU and LNXTHERM is the thermal zone defined in DSDT.

In the above example, we will look at ATK0101, LEN0013 and LEN0014 to find out if there is anything we can enable.

Read DSDT/SSDT