aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/acpi
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2008-02-06 19:28:02 -0500
committerLen Brown <len.brown@intel.com>2008-02-07 04:00:38 -0500
commitd89e9d6b4930c6505ac3ed35f57ab7f4311d6cf6 (patch)
treee4faa7d3ba69d9891776feae6b24881c61a79a9d /Documentation/acpi
parent9cbc7960288d28aec95257af59854e1d14ba23b8 (diff)
ACPI: update DSDT override documentation
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'Documentation/acpi')
-rw-r--r--Documentation/acpi/dsdt-initrd.txt99
-rw-r--r--Documentation/acpi/dsdt-override.txt15
-rwxr-xr-xDocumentation/acpi/initramfs-add-dsdt.sh43
3 files changed, 58 insertions, 99 deletions
diff --git a/Documentation/acpi/dsdt-initrd.txt b/Documentation/acpi/dsdt-initrd.txt
deleted file mode 100644
index 736043359dfb..000000000000
--- a/Documentation/acpi/dsdt-initrd.txt
+++ /dev/null
@@ -1,99 +0,0 @@
1ACPI Custom DSDT read from initramfs
2
32003 by Markus Gaugusch < dsdt at gaugusch dot at >
4Special thanks go to Thomas Renninger from SuSE, who updated the patch for
52.6.0 and later modified it to read inside initramfs
62004 - 2008 maintained by Eric Piel < eric dot piel at tremplin-utc dot net >
7
8This option is intended for people who would like to hack their DSDT and don't
9want to recompile their kernel after every change. It can also be useful to
10distros which offers pre-compiled kernels and want to allow their users to use
11a modified DSDT. In the Kernel config, enable the initial RAM filesystem
12support (in General Setup) and enable ACPI_CUSTOM_DSDT_INITRD at the ACPI
13options (General Setup|ACPI Support|Read Custom DSDT from initramfs).
14
15A custom DSDT (Differentiated System Description Table) is useful when your
16computer uses ACPI but problems occur due to broken implementation. Typically,
17your computer works but there are some troubles with the hardware detection or
18the power management. You can check that troubles come from errors in the DSDT by
19activating the ACPI debug option and reading the logs. This table is provided
20by the BIOS, therefore it might be a good idea to check for BIOS update on your
21vendor website before going any further. Errors are often caused by vendors
22testing their hardware only with Windows or because there is code which is
23executed only on a specific OS with a specific version and Linux hasn't been
24considered during the development.
25
26Before you run away from customising your DSDT, you should note that already
27corrected tables are available for a fair amount of computers on this web-page:
28http://acpi.sf.net/dsdt . Be careful though, to work correctly a DSDT has to
29match closely the hardware, including the amount of RAM, the frequency of the
30processor and the PCI cards present! If you are part of the unluckies who
31cannot find their hardware in this database, you can modify your DSDT by
32yourself. This process is less painful than it sounds. Download the Intel ASL
33compiler/decompiler at http://www.intel.com/technology/IAPC/acpi/downloads.htm .
34As root, you then have to dump your DSDT and decompile it. By using the
35compiler messages as well as the kernel ACPI debug messages and the reference
36book (available at the Intel website and also at http://www.acpi.info), it is
37quite easy to obtain a fully working table.
38
39Once your new DSDT is ready you'll have to add it to an initramfs so that the
40kernel can read the table at the very beginning of the boot. As the file has to
41be accessed very early during the boot process the initramfs has to be an
42initramfs. The file is contained into the initramfs under the name /DSDT.aml .
43To obtain such an initramfs, you might have to modify your initramfs script or
44you can add it later to the initramfs with the script appended to this
45document. The command will look like:
46initramfs-add-dsdt initramfs.img my-dsdt.aml
47
48In case you don't use any initramfs, the possibilities you have are to either
49start using one (try mkinitrd or yaird), or use the "Include Custom DSDT"
50configure option to directly include your DSDT inside the kernel.
51
52The message "Looking for DSDT in initramfs..." will tell you if the DSDT was
53found or not. If you need to update your DSDT, generate a new initramfs and
54perform the steps above. Don't forget that with Lilo, you'll have to re-run it.
55
56
57====================== Here starts initramfs-add-dsdt ==========================
58#!/bin/bash
59# Adds a DSDT file to the initrd (if it's an initramfs)
60# first argument is the name of archive
61# second argument is the name of the file to add
62# The file will be copied as /DSDT.aml
63
64# 20060126: fix "Premature end of file" with some old cpio (Roland Robic)
65# 20060205: this time it should really work
66
67# check the arguments
68if [ $# -ne 2 ]; then
69 program_name=$(basename $0)
70 echo "\
71$program_name: too few arguments
72Usage: $program_name initrd-name.img DSDT-to-add.aml
73Adds a DSDT file to an initrd (in initramfs format)
74
75 initrd-name.img: filename of the initrd in initramfs format
76 DSDT-to-add.aml: filename of the DSDT file to add
77 " 1>&2
78 exit 1
79fi
80
81# we should check it's an initramfs
82
83tempcpio=$(mktemp -d)
84# cleanup on exit, hangup, interrupt, quit, termination
85trap 'rm -rf $tempcpio' 0 1 2 3 15
86
87# extract the archive
88gunzip -c "$1" > "$tempcpio"/initramfs.cpio || exit 1
89
90# copy the DSDT file at the root of the directory so that we can call it "/DSDT.aml"
91cp -f "$2" "$tempcpio"/DSDT.aml
92
93# add the file
94cd "$tempcpio"
95(echo DSDT.aml | cpio --quiet -H newc -o -A -O "$tempcpio"/initramfs.cpio) || exit 1
96cd "$OLDPWD"
97
98# re-compress the archive
99gzip -c "$tempcpio"/initramfs.cpio > "$1"
diff --git a/Documentation/acpi/dsdt-override.txt b/Documentation/acpi/dsdt-override.txt
new file mode 100644
index 000000000000..5008f256a2db
--- /dev/null
+++ b/Documentation/acpi/dsdt-override.txt
@@ -0,0 +1,15 @@
1Linux supports two methods of overriding the BIOS DSDT:
2
3CONFIG_ACPI_CUSTOM_DSDT builds the image into the kernel.
4
5CONFIG_ACPI_CUSTOM_DSDT_INITRD adds the image to the initrd.
6
7When to use these methods is described in detail on the
8Linux/ACPI home page:
9http://www.lesswatts.org/projects/acpi/overridingDSDT.php
10
11Note that if both options are used, the DSDT supplied
12by the INITRD method takes precedence.
13
14Documentation/initramfs-add-dsdt.sh is provided for convenience
15for use with the CONFIG_ACPI_CUSTOM_DSDT_INITRD method.
diff --git a/Documentation/acpi/initramfs-add-dsdt.sh b/Documentation/acpi/initramfs-add-dsdt.sh
new file mode 100755
index 000000000000..17ef6e838e14
--- /dev/null
+++ b/Documentation/acpi/initramfs-add-dsdt.sh
@@ -0,0 +1,43 @@
1#!/bin/bash
2# Adds a DSDT file to the initrd (if it's an initramfs)
3# first argument is the name of archive
4# second argument is the name of the file to add
5# The file will be copied as /DSDT.aml
6
7# 20060126: fix "Premature end of file" with some old cpio (Roland Robic)
8# 20060205: this time it should really work
9
10# check the arguments
11if [ $# -ne 2 ]; then
12 program_name=$(basename $0)
13 echo "\
14$program_name: too few arguments
15Usage: $program_name initrd-name.img DSDT-to-add.aml
16Adds a DSDT file to an initrd (in initramfs format)
17
18 initrd-name.img: filename of the initrd in initramfs format
19 DSDT-to-add.aml: filename of the DSDT file to add
20 " 1>&2
21 exit 1
22fi
23
24# we should check it's an initramfs
25
26tempcpio=$(mktemp -d)
27# cleanup on exit, hangup, interrupt, quit, termination
28trap 'rm -rf $tempcpio' 0 1 2 3 15
29
30# extract the archive
31gunzip -c "$1" > "$tempcpio"/initramfs.cpio || exit 1
32
33# copy the DSDT file at the root of the directory so that we can call it "/DSDT.aml"
34cp -f "$2" "$tempcpio"/DSDT.aml
35
36# add the file
37cd "$tempcpio"
38(echo DSDT.aml | cpio --quiet -H newc -o -A -O "$tempcpio"/initramfs.cpio) || exit 1
39cd "$OLDPWD"
40
41# re-compress the archive
42gzip -c "$tempcpio"/initramfs.cpio > "$1"
43