How to check for ACPI BIOS syntax bugs using Intel's ACPICA tools ================================================================= Introduction ------------ Why is it important to use Intel's ACPICA tools [1] to check for ACPI BIOS syntax errors? The code from the ACPICA project is merged into the Linux kernel regurarly. Bugs found using the ACPI userspace disassembler and compiler (iasl) often identify bugs which are essential for a proper running Linux kernel. The Windows ACPI compiler misses a lot syntax checking, the Intel one is much more restrict in this respect. It offers vendors the possibility to make their ACPI BIOS implementation more robust. Upcoming issues due to a lazy ACPI implementation in future OSes, in Windows, Linux or others, can be avoided by using the ACPICA tools and thus more strictly stick to the ACPI specification. Basic ACPI BIOS code checking ----------------------------- The ACPICA sources are merged into several open operating systems and are therefore published based on a open source license and publically available for download. A tarball can be obtained here: http://acpica.org/downloads/ a revision control system repository based on git can be found here: http://acpica.org/source/ On OpenSUSE the package that include executables of most important ACPICA tools is pmtools.rpm (Whatabout RedHat and others? Waiting for feedback to add this). If the pmtools package is installed, simply execute these commands on a shell for a basic check of the ACPI tables on system where you execute the commands: mkdir /tmp/acpi # create a directory to store the extracted # BIOS tables cd /tmp/acpi acpidump >acpidump # extract all/most ACPI BIOS tables in a meta format acpixtract -a acpidump # extract all BIOS tables from acpidump into # single files including the raw BIOS tables iasl -d DSDT.dat # disassemble the DSDT, creates DSDT.dsl for x in SSDT*.dat;do # disassemble all SSDT if there are any. iasl -e DSDT.dat -d $x # Tell the compiler to use the DSDT table done # for cross-references (variables used in # the SSDT, but declared in the DSDT # Now you have the disassembled source files: # in *.dsl iasl -sa DSDT.dsl # recompile the ACPI code. If any warnings or for x in SSDT*.dat;do # errors are shown, edit and fix the sources iasl -sa $x # until all syntax error disappear. done # Unless scope similar errors are present, # this is mostly very easy to do for programmers # which are used to the ACPI source language. # The compiler already points you to the line # numbers where the code is broken. Author: Thomas Renninger Copyright: Novell - SuSE Products GmbH Last edit: 21.11.2008