ACPI Custom DSDT read from initrd

2003 by Markuss Gaugusch < dsdt at gaugusch dot org >
Special thanks go to Thomas Renninger from SuSE, who updated the patch for 2.6.0
2004 maintained by Eric Piel < eric dot piel at tremplin-utc dot net >

This option is intended for people who like to hack their DSDT and don't want
to recompile their kernel after every change. It can also be useful to distros
which offers pre-compiled kernels and want to allow their users to use a
modified DSDT. In the Kernel config, enable the ramdisk (not as module!) and initrd
(in Block Devices) and enable ACPI_CUSTOM_DSDT_INITRD at the ACPI
options (General Setup|ACPI Support|Read custom DSDT from initrd).

A custom DSDT (Differentiated System Description Table) is useful when your
computer uses ACPI but problems occurs due to broken implementation. Typically,
your computer works but there are some troubles with the hardware detection or
the power management. You can check that troubles come from errors in the DSDT by
activating the ACPI debug option and reading the logs. This table is provided
by the BIOS, therefore it might be a good idea to check for BIOS update on your
vendor website before going any further. Errors are often caused by vendors
testing their hardware only with Windows or because there is code which is
executed only on a specific OS with a specific version and Linux hasn't been
considered during the development.

Before you run away from customising your DSDT, you should note that already
corrected tables are available for a fair amount of computers on this web-page:
http://acpi.sf.net/dsdt . If you are part of the unluckies who cannot find
their hardware in this database, you can modify your DSDT by yourself. This
process is less painful than it sounds. Download the Intel ASL 
compiler/decompiler at http://www.intel.com/technology/IAPC/acpi/downloads.htm .
As root, you then have to dump your DSDT and decompile it. By using the
compiler messages as well as the kernel ACPI debug messages and the reference book
(available at the Intel website and also at http://www.acpi.info), it is quite
easy to obtain a fully working table.

Once your new DSDT is ready you'll have to add it to an initrd so that the
kernel can read the table at the very beginning of the boot. If you don't have
any initrd yet, you can just specify the table as an initrd file (in lilo or
grub) and it will work. Otherwise you have to separate the DSDT from the rest
by a signature. Do it like it:
echo -n "INITRDDSDT123DSDT123" >> /boot/initrd #magic signature
cat DSDT.aml >> /boot/initrd

The message "Looking for DSDT in initrd..." will tell you if the DSDT was
found or not. If you need to update your DSDT, generate a new initrd and
perform the steps above.


