[ Prev ] [ Index ] [ Next ]

acpi

Created 2003-02-23

ACPI is the Advanced Configuration and Power Interface is part of the BIOS and is used to monitor the state of attributes of hardware devices such the cpu frequency and temperature, or the battery amps or the video rom and so on.

In linux, the acpi information is made available within the /proc filesystem. Each APCI monitored device has an entry in the /proc filesystem and within each entry, there is typically at least a "state" and "info" file.

The ACPI project is currently located at http://acpi.sourceforge.net

1. Devices and interpretation

The following is a (not complete) list of ACPI devices and what hardware they releate to:

2. DMI Table

The DMI table (also called the SMBIOS table) contents can be viewed using dmidecode. The table contains a description of the system’s hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision.

bash # dmidecode

3. Including a custom DSDT in the kernel

Get the original DSDT:

bash # cp /proc/acpi/dsdt DSDT
bash $ acpixtract DSDT acpidump > DSDT

Disassemble, make changes and then compile:

bash $ iasl -d DSDT
bash $ vi DSDT.dsl
bash $ iasl -tc DSDT.dsl

Put the new DSDT where the kernel build can include it:

bash $ cp DSDT.hex <kernel src>/include/

Modify the kernel .config to inform the new kernel that a custom ACPI DSDT is being used:

CONFIG_STANDALONE=n
CONFIG_ACPI_CUSTOM_DSDT=y
CONFIG_ACPI_CUSTOM_DSDT_FILE="DSDT.hex"

Build the kernel and off you go. You should see the following in dmesg:

Table [DSDT] replaced by host OS

Note that with "CONFIG_ACPI_DEBUG=y", ASL store operations to the special object "Debug" will be made available to the dmesg output, e.g.,

ASL:

Store("hello world!", Debug)
Store(Local0, Debug)

dmesg:

[ACPI Debug]  String: [0x0C] "hello world!"
[ACPI Debug]  Integer: 0x00000042

Stuart Moorfoot © 23 Feb 2003 **foo@bund.com.au**


Backlinks: