Documentation - How to debug ACPI Problems
Subsystems (2)
Hi,
I made up a little How-To for what I find out is nice to debug ACPI problems.
Any enhancements, corrections, etc. are very much appreciated.
I'd like to have a final version in the Documentation section.
IMO the size and complexity of ACPI justifies to start an own Documentation/acpi directory.
Not sure whether thinkpad-acpi.txt (are there other related How-Tos?) should be added there as it got split out of drivers/acpi recently.
Not sure whether it's necessary to send a patch at all for a new Documentation file, for now the plain file is easier to read and comment on.
Thanks,
Thomas
How to debug ACPI Problems
==========================
Thomas Renninger <[email protected]>, 2007
Copyright (C) 2007 SUSE Linux GmbH
1. Introduction
---------------
1.1. General Info
- - - - - - - -
Please refer to the latest ACPI spec for general ACPI information:
http://www.acpi.info/spec.htm
ACPI is required by most recent x86, x86_64 and IA64 architecture based machines.
In general ACPI tables provide information from the BIOS to the OS. There are ACPI tables (DSDT and SSDTs), written in the ACPI Source Language (ASL) which include byte code (similar to Java byte code) that gets interpreted by the OS. The kernel makes use of provided BIOS functions declared and described there by interpreting them to setup and access different hardware.
There exist two compilers/interpreters for ASL code, one from Microsoft and one from Intel. The Intel code has an Open Source license. The software package is called ACPICA. It includes the code for disassembling DSDT tables, (re-)compiling them, parsing several ACPI tables and interpreting ACPI Machine Language (AML, the compiled ASL..). The code is used to provide several userspace tools, but large parts are also contributed to the linux kernel and other OSs.drivers/acpi/*.c currently is Linux code implementing most parts of the ACPI spec, everything in the directories below, gets synced with the ACPICA Intel package.
1.2. Useful Userspace Tools for Table Playing
- - - - - - - - - - - - - - - - - - - - - - -
The ACPI tables of your system can be extracted with the acpidump tool:
in the latest pmutils package from here:
ftp://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/utils
acpixtract, iasl, acpiexec can be found in the ACPICA sources:
http://developer.intel.com/technology/iapc/acpi/downloads.htm
You can now:
acpidump >acpidump # cp your ACPI tables from memory to disk acpixtract -a acpidump # extract them into raw, single tables iasl -d TABLE.dat # disassemble/parse a specific table iasl -sa DSDT.dsl # e.g. recompile a modified, disassembled DSDT for
initramfs inclusion (see later)
acpiexec DSDT.dat # parse, interpret and load a DSDT in userspace
The latter can sometimes be very useful to debug buggy DSDTs in userspace. It provides a debug shell which e.g. offers execution of specific ACPI functions, increase of debug output and more.
2. Overriding DSDT
------------------
The DSDT (there is a patch also for SSDTs) can be overridden by the user. The tables get copied to RAM when booting and the kernel can override them with alternative tables at early boot time.
In history people used to override their DSDT to workaround BIOS or even kernel bugs. This is a bad idea, the override functionality is for short term workarounds and mainly for debugging! Please always report such bugs to bugzilla.kernel.org or post to [email protected] if unsure.
There are two possibilities to override the DSDT:
- via CONFIG_ACPI_CUSTOM_DSDT (and _FILE) compile option(s)
- via adding a customized DSDT into initramfs
The second approach does not need kernel recompilation and some distributions provide the patch, which is not included in mainline, in their kernels.
The patch and more information can be found here (many thanks to Markus Gaugusch and Eric Piel):
http://gaugusch.at/kernel.shtml
3. Problem Analysis and Solving
-------------------------------
3.1. I see Warnings or Errors when disassembling or compiling my DSDT
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Some might be sever ACPICA or BIOS bugs, some might just be incompatibilities with the Microsoft compiler. We want to fix both, therefore a bug should be filed at bugzilla.kernel.org
In general you should watch your system, if you don't miss any functionality there is no reason to panic (e.g. modify the DSDT and override your original one, you really should not do that if you do not see any big advantage and even then, better try to get a real fix or at least a kernel workaround like a boot or module parameter).
You should be able to debug this with userspace tools (See:
"1.2. Useful Userspace Tools for Table Playing")
3.2) Hardware accessed by ACPI is not working correctly - Using ACPI_DEBUG
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you expect the bug in a module in drivers/acpi/*.c code you might have luck and be able to find or narrow down the culprit by simple printks.
On more complicated bugs you should make use of the ACPI_DEBUG=y facility. This allows you to fine grain enable specific output in the ACPI interpreter.
3.2.1 Using ACPI_DEBUG Boot Parameters acpi.debug_level and acpi.debug_layer
Note: In kernel versions before 2.6.22 the boot parameters are:
acpi_dbg_level and acpi_dbg_layer
ACPI can produce tons of debug output if these debug masks are switched to full on.
include/acpi/acoutput.h shows which flags can be enabled for level and layer (cat /proc/acpi/debug_{level,layer} also shows you the flags, but that interface will move to sysfs, not sure whether there still will be such a help).
Therefore, switch on debug flags carefully. You also might want to increase the kernel ring buffer by passing:
log_buf_len=XY in bytes and later use dmesg -s XY to get more than 16k kernel log output.
Instead of serial console logging you might want to use the netconsole interface (Documentation/networking/netconsole.txt) to write away syslog messages over network or firescope (patches already exist in 2.6.22-rcX-mm?) to send syslog messages over firewire. The latter might be the only way to debug early hangs on laptops without serial console anyway.
3.2.2 Using ACPI_DEBUG Boot Parameters via /sysfs and /proc
The same as 3.2.1., you can also pass the parameters at runtime e.g. via:
echo 0x1F >/proc/acpi/debug_level # before 2.6.22 or
echo ?!? >/sys/?/!/? # Rui?
Wrapping such statements around loading and unloading a bug affected ACPI module might give you the possibility to increase debug_level, but still only give you a managable amount of debug output.
3.2.3 Using ACPI_DEBUG ASL debug object
You can also add a kind of printk to DSDT code(see 2. Overriding DSDT) Store (XY, debug), will print the value of the ACPI XY variable into syslog. Be aware that you need to have the
#define ACPI_LV_DEBUG_OBJECT 0x00000008
value defined in the debug_level mask to see any output. This may only be useful if you get too much output with 3.2.[12] and you think it is convenient to debug a very specific part of the ACPI code.
3.2.4 Using ACPI_DEBUG acpi_dbg_layer and acpi_dbg_level kernel variables
Similar, but more powerful than 3.2.3 is to modify the global kernel variables for level and layer conditionally in the kernel code for your needs.
E.g.
acpi_debug_level=0xFFFFFFFF /* increase debug output to max */ status = acpi_ut_evaluate_object(...) /* by kernel invoked ACPI method
that should get debugged with very high debug output*/
acpi_debug_level=0x3 /* lower debug output again */
"It seems unfortunate if we do this work and get our partners to do the work and the result is that Linux works great without having to do the work" (Bill Gates on Making ACPI Not Work with Linux,
http://www.osnews.com/story.php/17689/Bill-Gates-on-Making-ACPI-Not-Work-with-Linux)
Quoted 5 lines · Thomas Renninger
Hi,
I made up a little How-To for what I find out is nice to debug ACPI problems.
Nice :-)
Quoted 2 lines
Any enhancements, corrections, etc. are very much appreciated.
See below.
Quoted 2 lines
I'd like to have a final version in the Documentation section.
When you send in the patch to add that final version, please also remember to add an entry to Documentation/00-INDEX
[snip]
Quoted 8 lines
How to debug ACPI Problems
==========================Thomas Renninger <[email protected]>, 2007
Copyright (C) 2007 SUSE Linux GmbH
Quoted 6 lines
1. Introduction
---------------1.1. General Info
- - - - - - - -
Perhaps start out here by telling people what ACPI is. Something like this:
ACPI stands for Advanced Configuration and Power Interface.
Quoted 10 lines
Please refer to the latest ACPI spec for general ACPI information:
http://www.acpi.info/spec.htmACPI is required by most recent x86,
x86_64and IA64 architecture based machines.In general ACPI tables provide information from the BIOS to the OS. There are ACPI tables (DSDT and SSDTs), written in the ACPI Source Language (ASL) which include byte code (similar to Java byte code) that gets interpreted by the OS. The kernel makes use of provided BIOS functions
The word "provided" seems superfluous here.
[snip]
Quoted 2 lines
The ACPI tables of your system can be extracted with the acpidump tool:
I think the colon ":" at the end of this line should be removed.
Quoted 3 lines
in the latest pmutils package from here:
ftp://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/utils
[snip]
Quoted 2 lines
In history people used to override their DSDT to workaround BIOS or even kernel
I would replace "In history people used to ..." with "Historically people used to ...".
[snip]
Quoted 3 lines
If you expect the bug in a module in
drivers/acpi/*.ccode you might have luck and be able to find or narrow down the culprit by simple printks.
I would rewrite that bit as :
If you suspect the bug to be in a module in drivers/acpi/*.c code, you may be able to find or narrow down the culprit simply by adding printk()'s.
Quoted 1 line
On more complicated bugs you should make use of the ACPI_DEBUG=y facility.
Maybe just me, but I would say "For" here instead of "On".
[snip]
Quoted 1 line
Note: In kernel versions before 2.6.22 the boot parameters are:
should be "...the boot parameters were:" - past tense.
[snip]
Quoted 2 lines
interface (
Documentation/networking/netconsole.txt) to write away syslog messages over network or firescope
"... to write away syslog messages over network ..." sounds a little clumsy to me. Why not simply write "... to send syslog messages over network ..." ?
Quoted 5 lines
(patches already exist in
2.6.22-rcX-mm?) to send syslog messages over firewire. The latter might be the only way to debug early hangs on laptops without serial console anyway.
"without a serial console" ???
Quoted 6 lines
3.2.2 Using
ACPI_DEBUGBoot Parameters via /sysfs and /procThe same as 3.2.1., you can also pass the parameters at runtime e.g. via: echo 0x1F >/proc/acpi/debug_level # before 2.6.22 or echo ?!? >/sys/?/!/? # Rui?
Seems like some bits are missing here ^^^
Quoted 4 lines
Wrapping such statements around loading and unloading a bug affected ACPI module might give you the possibility to increase
debug_level, but still only give you a managable amount of debug output.
s/managable/manageable/
[snip]
Signature · 3 lines
Jesper Juhl <[email protected]> Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html Plain text mails only, please http://www.expita.com/nomime.html
Quoted 2 lines · Thomas Renninger
Please refer to the latest ACPI spec for general ACPI information:
http://www.acpi.info/spec.htm
It is worth noting that not all systems are required to implement the latest and greatest version of spec, or all the objects of the chosen version.
Quoted 16 lines · Thomas Renninger
3. Problem Analysis and Solving
-------------------------------3.1. I see Warnings or Errors when disassembling or compiling my DSDT
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Some might be sever ACPICA or BIOS bugs, some might just be incompatibilities with the Microsoft compiler. We want to fix both, therefore a bug should be filed at bugzilla.kernel.org
In general you should watch your system, if you don't miss any functionality there is no reason to panic (e.g. modify the DSDT and override your original one, you really should not do that if you do not see any big advantage and even then, better try to get a real fix or at least a kernel workaround like a boot or module parameter).
Quoted 5 lines
You should be able to debug this with userspace tools (See:
"1.2. Useful Userspace Tools for Table Playing")3.2) Hardware accessed by ACPI is not working correctly - Using
ACPI_DEBUG
3.2. typo
Quoted 14 lines
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you expect the bug in a module in
drivers/acpi/*.ccode you might have luck and be able to find or narrow down the culprit by simple printks.On more complicated bugs you should make use of the ACPI_DEBUG=y facility. This allows you to fine grain enable specific output in the ACPI interpreter.
3.2.1 Using
ACPI_DEBUGBoot Parameters acpi.debug_level and acpi.debug_layerNote: In kernel versions before 2.6.22 the boot parameters are:
acpi_dbg_levelandacpi_dbg_layer
Quoted 6 lines
ACPI can produce tons of debug output if these debug masks are switched to full on.
include/acpi/acoutput.hshows which flags can be enabled for level and layer (cat/proc/acpi/debug_{level,layer}also shows you the flags, but that interface will move to sysfs, not sure whether there still will be such a help).
They work in the same way as they do in procfs. i.e. cat /sys/module/acpi/parameters/debug_{level,layer} shows you the flags as well.
In fact, I think they can replace the proc I/F right now.
Quoted 12 lines
Therefore, switch on debug flags carefully. You also might want to increase the kernel ring buffer by passing:
log_buf_len=XY in bytes and later use dmesg -s XY to get more than 16k kernel log output.
Instead of serial console logging you might want to use the netconsole interface (Documentation/networking/netconsole.txt) to write away syslog messages over network or firescope (patches already exist in 2.6.22-rcX-mm?) to send syslog messages over firewire. The latter might be the only way to debug early hangs on laptops without serial console anyway.
Quoted 6 lines
3.2.2 Using
ACPI_DEBUGBoot Parameters via /sysfs and /procThe same as 3.2.1., you can also pass the parameters at runtime e.g. via: echo 0x1F >/proc/acpi/debug_level # before 2.6.22 or echo ?!? >/sys/?/!/? # Rui?
echo 0x1F >/sys/module/acpi/parameters/debug_level
And we still support the ACPI debug proc I/F at the current stage.
Thanks,
Rui
Thanks a lot for all your input!
Here is an updated version in patch format.
Len, it would be great if you can also add this one to your test tree.
Quoted 10 lines · Jesper Juhl
Quoted 7 lines · Thomas Renninger
Hi,
(patches already exist in
2.6.22-rcX-mm?) to send syslog messages over firewire. The latter might be the only way to debug early hangs on laptops without serial console anyway."without a serial console" ???
Without a serial device (or serial port?), better?
Quoted 9 lines
Quoted 7 lines
3.2.2 Using
ACPI_DEBUGBoot Parameters via /sysfs and /procThe same as 3.2.1., you can also pass the parameters at runtime e.g. via: echo 0x1F >/proc/acpi/debug_level # before 2.6.22 or echo ?!? >/sys/?/!/? # Rui?Seems like some bits are missing here ^^^
Thanks to Rui, updated..
Thomas
Create Documentation/acpi dir and add first ACPI debug How-To
--- Documentation/00-INDEX | 3 Documentation/acpi/00-INDEX | 4 Documentation/acpi/acpi_debugging.txt | 181 ++++++++++++++++++++++++++++++++++ 3 files changed, 188 insertions(+)
Documentation/acpi/acpi_debugging.txt new file +181 -0
@@ -0,0 +1,181 @@ +How to debug ACPI (Advanced Configuration and Power Interface) Problems +======================================================================= + +Thomas Renninger <[email protected]>, 2007 +Copyright (C) 2007 SUSE Linux GmbH + + +1. Introduction +--------------- + +1.1. General Info +- - - - - - - - + +Please refer to the latest ACPI spec for general ACPI information: +http://www.acpi.info/spec.htm + + +ACPI is required by most recent x86, x86_64 and IA64 architecture based +machines. + +In general ACPI tables provide information from the BIOS to the OS. +There are ACPI tables (DSDT and SSDTs), written in the ACPI Source +Language (ASL) which include byte code (similar to Java byte code) that gets +interpreted by the OS. The kernel makes use of BIOS functions declared and +described there by interpreting them to setup and access different hardware. + +There exist two compilers/interpreters for ASL code, one from Microsoft and +one from Intel. The Intel code has an Open Source license. The software package +is called ACPICA. It includes the code for disassembling DSDT tables, +(re-)compiling them, parsing several ACPI tables and interpreting ACPI Machine +Language (AML, the compiled ASL..). The code is used to provide several +userspace tools, but large parts are also contributed to the linux kernel and +other OSs. +drivers/acpi/*.c currently is Linux code implementing most parts of the ACPI +spec, everything in the directories below, gets synchronized with the ACPICA +Intel package. + + +1.2. Useful Userspace Tools for Table Playing +- - - - - - - - - - - - - - - - - - - - - - - + +The ACPI tables of your system can be extracted with the acpidump tool in the +latest pmutils package from here: +ftp://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/utils + +acpixtract, iasl, acpiexec can be found in the ACPICA sources: +http://developer.intel.com/technology/iapc/acpi/downloads.htm + +You can now: +acpidump >acpidump # cp your ACPI tables from memory to disk +acpixtract -a acpidump # extract them into raw, single tables +iasl -d TABLE.dat # disassemble/parse a specific table +iasl -sa DSDT.dsl # e.g. recompile a modified, disassembled DSDT for + initramfs inclusion (see later) +acpiexec DSDT.dat # parse, interpret and load a DSDT in userspace + +The latter can sometimes be very useful to debug buggy DSDTs in userspace. +It provides a debug shell which e.g. offers execution of specific ACPI +functions, increase of debug output and more. + + +2. Overriding DSDT +------------------ + +The DSDT (there is a patch also for SSDTs) can be overridden by the user. +The tables get copied to RAM when booting and the kernel can override them with +alternative tables at early boot time. + +Historically people used to override their DSDT to workaround BIOS or even +kernel bugs. This is a bad idea, the override functionality is for short +term workarounds and mainly for debugging! Please always report such bugs to +bugzilla.kernel.org or post to [email protected] if unsure. + +There are two possibilities to override the DSDT: + + - via CONFIG_ACPI_CUSTOM_DSDT (and _FILE) compile option(s) + - via adding a customized DSDT into initramfs + +The second approach does not need kernel recompilation and some distributions +provide the patch, which is not included in mainline, in their kernels. + +The patch and more information can be found here (many thanks to Markus +Gaugusch and Eric Piel): +http://gaugusch.at/kernel.shtml + + +3. Problem Analysis and Solving +------------------------------- + +3.1. I see Warnings or Errors when disassembling or compiling my DSDT +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +Some might be sever ACPICA or BIOS bugs, some might just be incompatibilities +with the Microsoft compiler. We want to fix both, therefore a bug should be +filed at bugzilla.kernel.org +In general you should watch your system, if you don't miss any functionality +there is no reason to panic (e.g. modify the DSDT and override your original +one, you really should not do that if you do not see any big advantage and even +then, better try to get a real fix or at least a kernel workaround like a +boot or module parameter). + +You should be able to debug this with userspace tools (See: +"1.2. Useful Userspace Tools for Table Playing") + + +3.2. Hardware accessed by ACPI is not working correctly - Using ACPI_DEBUG +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +If you suspect the bug to be in a module in drivers/acpi/*.c code, you may be +able to find or narrow down the culprit simply by adding printk()'s. + +For more complicated bugs you should make use of the ACPI_DEBUG=y facility. +This allows you to fine grain enable specific output in the ACPI interpreter. + + + 3.2.1 Using ACPI_DEBUG Boot Parameters acpi.debug_level and acpi.debug_layer + + Note: In kernel versions before 2.6.22 the boot parameters were: + acpi_dbg_level and acpi_dbg_layer + + ACPI can produce tons of debug output if these debug masks are + switched to full on. + include/acpi/acoutput.h shows which flags can be enabled for level and + layer (cat /proc/acpi/debug_{level,layer} also shows you the flags, + but that interface will move to sysfs, not sure whether there still + will be such a help). + + Therefore, switch on debug flags carefully. You also might want to + increase the kernel ring buffer by passing: + log_buf_len=XY in bytes and later use dmesg -s XY to get more than + 16k kernel log output. + Instead of serial console logging you might want to use the netconsole + interface (Documentation/networking/netconsole.txt) to send syslog + messages over network or firewire to send syslog messages over + firewire. + The latter might be the only way to debug early hangs on laptops + without a serial device anyway. + + 3.2.2 Using ACPI_DEBUG Boot Parameters via /sysfs and /proc + + The same as 3.2.1., you can also pass the parameters at runtime e.g. + via: + echo 0x1F >/sys/module/acpi/parameters/debug_{level,layer} + + Be aware that this interface exists since 2.6.22. In older kernels + it is /proc/acpi/debug_{level,layer}, which worked in the same way. + + Wrapping such statements around loading and unloading a bug affected + ACPI module might give you the possibility to increase debug_level, + but still only give you a manageable amount of debug output. + + 3.2.3 Using ACPI_DEBUG ASL debug object + + You can also add a kind of printk to DSDT code(see 2. Overriding DSDT) + Store (XY, debug), will print the value of the ACPI XY variable into + syslog. Be aware that you need to have the + #define ACPI_LV_DEBUG_OBJECT 0x00000008 + value defined in the debug_level mask to see any output. + This may only be useful if you get too much output with 3.2.[12] and + you think it is convenient to debug a very specific part of the ACPI + code. + + 3.2.4 Using ACPI_DEBUG acpi_dbg_layer and acpi_dbg_level kernel variables + + Similar, but more powerful than 3.2.3 is to modify the global kernel + variables for level and layer conditionally in the kernel code for + your needs. + E.g. + acpi_debug_level=0xFFFFFFFF /* increase debug output to max */ + status = acpi_ut_evaluate_object(...) /* by kernel invoked ACPI method + that should get debugged with + very high debug output*/ + acpi_debug_level=0x3 /* lower debug output again */ + + + + +"It seems unfortunate if we do this work and get our +partners to do the work and the result is that Linux works great without +having to do the work" (Bill Gates on Making ACPI Not Work with Linux, +http://www.osnews.com/story.php/17689/Bill-Gates-on-Making-ACPI-Not-Work-with-Linux)
Documentation/acpi/00-INDEX new file +4 -0
@@ -0,0 +1,4 @@ +00-INDEX + - this file +acpi_debugging.txt + - How to debug ACPI problems
Documentation/00-INDEX +3 -0
@@ -12,6 +12,9 @@ Following translations are available on 00-INDEX - this file. +acpi/ + - general ACPI information + BUG-HUNTING - brute force method of doing binary search of patches to find bug. Changes
Create Documentation/acpi dir and add first ACPI debug How-To
--- Documentation/00-INDEX | 3 Documentation/acpi/00-INDEX | 4 Documentation/acpi/acpi_debugging.txt | 181 ++++++++++++++++++++++++++++++++++ 3 files changed, 188 insertions(+)
Documentation/acpi/acpi_debugging.txt new file +181 -0
181 lines not on this page · raw message
Documentation/acpi/00-INDEX new file +4 -0
@@ -0,0 +1,4 @@ +00-INDEX + - this file +acpi_debugging.txt + - How to debug ACPI problems
Documentation/00-INDEX +3 -0
@@ -12,6 +12,9 @@ Following translations are available on 00-INDEX - this file. +acpi/ + - general ACPI information + BUG-HUNTING - brute force method of doing binary search of patches to find bug. Changes
Len Brown
reviewerQuoted 15 lines
+2. Overriding DSDT
+------------------Documentation/acpi/acpi_debugging.txt new file +12
-0+ +The DSDT (there is a patch also for SSDTs) can be overridden by the user. +The tables get copied to RAM when booting and the kernel can override them with +alternative tables at early boot time. + +Historically people used to override their DSDT to workaround BIOS or even +kernel bugs. This is a bad idea, the override functionality is for short +term workarounds and mainly for debugging! Please always report such bugs to +bugzilla.kernel.org or post to [email protected] if unsure. + +There are two possibilities to override the DSDT: +
Documentation/acpi/acpi_debugging.txt line 85
Quoted 10 lines
Documentation/acpi/acpi_debugging.txt new file +10
-0+ - via CONFIG_ACPI_CUSTOM_DSDT (and _FILE) compile option(s) + - via adding a customized DSDT into initramfs + +The second approach does not need kernel recompilation and some distributions +provide the patch, which is not included in mainline, in their kernels. + +The patch and more information can be found here (many thanks to Markus +Gaugusch and Eric Piel): +http://gaugusch.at/kernel.shtml +
how to override the DSDT by re-compiling the upstream kernel is already documented here:
http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/README.ACPI
It seems inconsistent to refer to the initrd patch from the in-tree Documentation, since that patch will always be out-of-tree.
I would think that the in-tree Documentation would refer to specifics relating to the kernel that is actually checked into the tree with the Documentation. This assumption can probably clear up some of the wording relating to the debug flags -- we don't have to describe the old ones -- if somebody is reading this documentation, they already have the new ones:-)
Asside from those specific things that describe the kernel in the tree, I'm thinking that acpi.sourceforge.net documentation would be a better place for a general HOWTO on debugging ACPI issues in general.
-Len
Quoted 28 lines · Len Brown
Quoted 14 lines
+2. Overriding DSDT
+------------------Documentation/acpi/acpi_debugging.txt new file +12
-0+ +The DSDT (there is a patch also for SSDTs) can be overridden by the user. +The tables get copied to RAM when booting and the kernel can override them with +alternative tables at early boot time. + +Historically people used to override their DSDT to workaround BIOS or even +kernel bugs. This is a bad idea, the override functionality is for short +term workarounds and mainly for debugging! Please always report such bugs to +bugzilla.kernel.org or post to [email protected] if unsure. + +There are two possibilities to override the DSDT: +Documentation/acpi/acpi_debugging.txt line 85
Quoted 10 lines
Documentation/acpi/acpi_debugging.txt new file +10
-0+ - via CONFIG_ACPI_CUSTOM_DSDT (and _FILE) compile option(s) + - via adding a customized DSDT into initramfs + +The second approach does not need kernel recompilation and some distributions +provide the patch, which is not included in mainline, in their kernels. + +The patch and more information can be found here (many thanks to Markus +Gaugusch and Eric Piel): +http://gaugusch.at/kernel.shtml +how to override the DSDT by re-compiling the upstream kernel is already documented here:
Ah yes, a link to this one is quite convenient...
Quoted 2 lines
It seems inconsistent to refer to the initrd patch from the in-tree Documentation, since that patch will always be out-of-tree.
It is inconsistent to point to a useful debug patch outside the kernel?
Quoted 5 lines
I would think that the in-tree Documentation would refer to specifics relating to the kernel that is actually checked into the tree with the Documentation. This assumption can probably clear up some of the wording relating to the debug flags -- we don't have to describe the old ones -- if somebody is reading this documentation, they already have the new ones:-)
rip out mentioning /proc/acpi/debug_{level,layer}? Ok.
Quoted 3 lines
Asside from those specific things that describe the kernel in the tree, I'm thinking that acpi.sourceforge.net documentation would be a better place for a general HOWTO on debugging ACPI issues in general.
Looking at:
http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/README.ACPI,
maybe we could just add that one instead to Documentation/acpi/*? If, splitting would IMO be easier to read, e.g. something like:
- report_acpi_kernel_bugs.txt
- sending_ACPI_patches.txt
- debugging_acpi_kernel_errors.txt
Thomas
Len Brown
reviewerQuoted 4 lines · Thomas Renninger
Thanks a lot for all your input!
Here is an updated version in patch format.
Len, it would be great if you can also add this one to your test tree.
Thomas,
Thanks for doing this.
I'll apply it, and then hack on it a bit.
-Len
Len Brown
reviewerQuoted 47 lines · Thomas Renninger
Quoted 28 lines · Len Brown
Quoted 14 lines
+2. Overriding DSDT
+------------------Documentation/acpi/acpi_debugging.txt new file +12
-0+ +The DSDT (there is a patch also for SSDTs) can be overridden by the user. +The tables get copied to RAM when booting and the kernel can override them with +alternative tables at early boot time. + +Historically people used to override their DSDT to workaround BIOS or even +kernel bugs. This is a bad idea, the override functionality is for short +term workarounds and mainly for debugging! Please always report such bugs to +bugzilla.kernel.org or post to [email protected] if unsure. + +There are two possibilities to override the DSDT: +Documentation/acpi/acpi_debugging.txt line 85
Quoted 10 lines
Documentation/acpi/acpi_debugging.txt new file +10
-0+ - via CONFIG_ACPI_CUSTOM_DSDT (and _FILE) compile option(s) + - via adding a customized DSDT into initramfs + +The second approach does not need kernel recompilation and some distributions +provide the patch, which is not included in mainline, in their kernels. + +The patch and more information can be found here (many thanks to Markus +Gaugusch and Eric Piel): +http://gaugusch.at/kernel.shtml +how to override the DSDT by re-compiling the upstream kernel is already documented here:
Ah yes, a link to this one is quite convenient...
Quoted 2 lines
It seems inconsistent to refer to the initrd patch from the in-tree Documentation, since that patch will always be out-of-tree.
It is inconsistent to point to a useful debug patch outside the kernel?
Quoted 5 lines
I would think that the in-tree Documentation would refer to specifics relating to the kernel that is actually checked into the tree with the Documentation. This assumption can probably clear up some of the wording relating to the debug flags -- we don't have to describe the old ones -- if somebody is reading this documentation, they already have the new ones:-)
rip out mentioning
/proc/acpi/debug_{level,layer}? Ok.Quoted 3 lines
Asside from those specific things that describe the kernel in the tree, I'm thinking that acpi.sourceforge.net documentation would be a better place for a general HOWTO on debugging ACPI issues in general.
Quoted 7 lines
Looking at:
http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/README.ACPI,
maybe we could just add that one instead toDocumentation/acpi/*? If, splitting would IMO be easier to read, e.g. something like:
- report_acpi_kernel_bugs.txt
- sending_ACPI_patches.txt
- debugging_acpi_kernel_errors.txt
Okay, good suggestion, I'll do it.
thanks,
-Len
Len Brown
reviewerReview
Quoted 3 lines
(quoted diff) +2
-0+Thomas Renninger <[email protected]>, 2007 +Copyright (C) 2007 SUSE Linux GmbH
While it seems to be generally customary to identify the authors of Documentation files, it doesn't seem to be customary for them to assert a copyright. Is this really necessary? My concern is that it could discourage contributors for user or changing the text in any way they see fit.
can anybody offer guidance on this?
thanks,
-Len
Quoted 10 lines · Len Brown
Review
Quoted 2 lines
(quoted diff) +2
-0+Thomas Renninger <[email protected]>, 2007 +Copyright (C) 2007 SUSE Linux GmbHWhile it seems to be generally customary to identify the authors of Documentation files, it doesn't seem to be customary for them to assert a copyright. Is this really necessary? My concern is that it could discourage contributors for user or changing the text in any way they see fit.
can anybody offer guidance on this?
I am no license expert, but if you do a:
grep Copyright Documentation/ -r
you see hundreds of Copyrights clauses..., everything in kernel is under GPL anyway and AFAIK the Copyright is just the explicit statement that the Author implicitly has anyway...
I don't care that much whether you exactly take this one. You still might want to take your documentation (I didn't know that you already set up this one on your ftp account). You still might want to merge parts of mine if it's appropriate, add a "thanks for input" or not, at least people have something to read at the end...
Thanks,
Thomas
Quoted 9 lines · Len Brown
Review
Quoted 2 lines
(quoted diff) +2
-0+Thomas Renninger <[email protected]>, 2007 +Copyright (C) 2007 SUSE Linux GmbHWhile it seems to be generally customary to identify the authors of Documentation files, it doesn't seem to be customary for them to assert a copyright. Is this really necessary? My concern is that it could discourage contributors for user or changing the text in any way they see fit.
can anybody offer guidance on this?
For docs that specify a friendly license explicitly (GPL, BSD, etc), that should not be a problem.
Signature · 4 lines
"One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh
Quoted 10 lines · On Tue, 14 Aug 2007 11:40:01 -0400 Len Brown <[email protected]> wrote:
Review
Quoted 3 lines
(quoted diff) +2
-0+Thomas Renninger <[email protected]>, 2007 +Copyright (C) 2007 SUSE Linux GmbHWhile it seems to be generally customary to identify the authors of Documentation files, it doesn't seem to be customary for them to assert a copyright. Is this really necessary? My concern is that it could discourage contributors for user or changing the text in any way they see fit.
can anybody offer guidance on this?
Its under the GPL so I don't see a problem really. I'd do the same for Red Hat for new documents of substance I was adding to be honest.
Quoted 10 lines · Len Brown
Review
Quoted 3 lines
(quoted diff) +2
-0+Thomas Renninger <[email protected]>, 2007 +Copyright (C) 2007 SUSE Linux GmbHWhile it seems to be generally customary to identify the authors of Documentation files, it doesn't seem to be customary for them to assert a copyright. Is this really necessary? My concern is that it could discourage contributors for user or changing the text in any way they see fit.
can anybody offer guidance on this?
Well, if it's a GPL-friendly license on the document, the contributors should feel free to change it as needed - that's the point of the GPL.
What it *does* make clear is that the doc was a "work for hire" under copyright law, and that if there's infringement, it isn't Thomas that's going to come looking for you, it's Suse Linux GmbH.
Quoted 9 lines
thanks,
(quoted diff) +0
-2-Len -To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/