Commit 99ed6bfaa5a0a4bffc10ff3ffe9c599bcf59236e

Authored by Changbin Du
Committed by Rafael J. Wysocki
1 parent 05000042f3

Documentation: ACPI: move debug.txt to firmware-guide/acpi and convert to reST

This converts the plain text documentation to reStructuredText format
and adds it to Sphinx TOC tree.

No essential content change.

Signed-off-by: Changbin Du <changbin.du@gmail.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Showing 3 changed files with 153 additions and 149 deletions Side-by-side Diff

Documentation/acpi/debug.txt
1   - ACPI Debug Output
2   -
3   -
4   -The ACPI CA, the Linux ACPI core, and some ACPI drivers can generate debug
5   -output. This document describes how to use this facility.
6   -
7   -Compile-time configuration
8   ---------------------------
9   -
10   -ACPI debug output is globally enabled by CONFIG_ACPI_DEBUG. If this config
11   -option is turned off, the debug messages are not even built into the
12   -kernel.
13   -
14   -Boot- and run-time configuration
15   ---------------------------------
16   -
17   -When CONFIG_ACPI_DEBUG=y, you can select the component and level of messages
18   -you're interested in. At boot-time, use the acpi.debug_layer and
19   -acpi.debug_level kernel command line options. After boot, you can use the
20   -debug_layer and debug_level files in /sys/module/acpi/parameters/ to control
21   -the debug messages.
22   -
23   -debug_layer (component)
24   ------------------------
25   -
26   -The "debug_layer" is a mask that selects components of interest, e.g., a
27   -specific driver or part of the ACPI interpreter. To build the debug_layer
28   -bitmask, look for the "#define _COMPONENT" in an ACPI source file.
29   -
30   -You can set the debug_layer mask at boot-time using the acpi.debug_layer
31   -command line argument, and you can change it after boot by writing values
32   -to /sys/module/acpi/parameters/debug_layer.
33   -
34   -The possible components are defined in include/acpi/acoutput.h and
35   -include/acpi/acpi_drivers.h. Reading /sys/module/acpi/parameters/debug_layer
36   -shows the supported mask values, currently these:
37   -
38   - ACPI_UTILITIES 0x00000001
39   - ACPI_HARDWARE 0x00000002
40   - ACPI_EVENTS 0x00000004
41   - ACPI_TABLES 0x00000008
42   - ACPI_NAMESPACE 0x00000010
43   - ACPI_PARSER 0x00000020
44   - ACPI_DISPATCHER 0x00000040
45   - ACPI_EXECUTER 0x00000080
46   - ACPI_RESOURCES 0x00000100
47   - ACPI_CA_DEBUGGER 0x00000200
48   - ACPI_OS_SERVICES 0x00000400
49   - ACPI_CA_DISASSEMBLER 0x00000800
50   - ACPI_COMPILER 0x00001000
51   - ACPI_TOOLS 0x00002000
52   - ACPI_BUS_COMPONENT 0x00010000
53   - ACPI_AC_COMPONENT 0x00020000
54   - ACPI_BATTERY_COMPONENT 0x00040000
55   - ACPI_BUTTON_COMPONENT 0x00080000
56   - ACPI_SBS_COMPONENT 0x00100000
57   - ACPI_FAN_COMPONENT 0x00200000
58   - ACPI_PCI_COMPONENT 0x00400000
59   - ACPI_POWER_COMPONENT 0x00800000
60   - ACPI_CONTAINER_COMPONENT 0x01000000
61   - ACPI_SYSTEM_COMPONENT 0x02000000
62   - ACPI_THERMAL_COMPONENT 0x04000000
63   - ACPI_MEMORY_DEVICE_COMPONENT 0x08000000
64   - ACPI_VIDEO_COMPONENT 0x10000000
65   - ACPI_PROCESSOR_COMPONENT 0x20000000
66   -
67   -debug_level
68   ------------
69   -
70   -The "debug_level" is a mask that selects different types of messages, e.g.,
71   -those related to initialization, method execution, informational messages, etc.
72   -To build debug_level, look at the level specified in an ACPI_DEBUG_PRINT()
73   -statement.
74   -
75   -The ACPI interpreter uses several different levels, but the Linux
76   -ACPI core and ACPI drivers generally only use ACPI_LV_INFO.
77   -
78   -You can set the debug_level mask at boot-time using the acpi.debug_level
79   -command line argument, and you can change it after boot by writing values
80   -to /sys/module/acpi/parameters/debug_level.
81   -
82   -The possible levels are defined in include/acpi/acoutput.h. Reading
83   -/sys/module/acpi/parameters/debug_level shows the supported mask values,
84   -currently these:
85   -
86   - ACPI_LV_INIT 0x00000001
87   - ACPI_LV_DEBUG_OBJECT 0x00000002
88   - ACPI_LV_INFO 0x00000004
89   - ACPI_LV_INIT_NAMES 0x00000020
90   - ACPI_LV_PARSE 0x00000040
91   - ACPI_LV_LOAD 0x00000080
92   - ACPI_LV_DISPATCH 0x00000100
93   - ACPI_LV_EXEC 0x00000200
94   - ACPI_LV_NAMES 0x00000400
95   - ACPI_LV_OPREGION 0x00000800
96   - ACPI_LV_BFIELD 0x00001000
97   - ACPI_LV_TABLES 0x00002000
98   - ACPI_LV_VALUES 0x00004000
99   - ACPI_LV_OBJECTS 0x00008000
100   - ACPI_LV_RESOURCES 0x00010000
101   - ACPI_LV_USER_REQUESTS 0x00020000
102   - ACPI_LV_PACKAGE 0x00040000
103   - ACPI_LV_ALLOCATIONS 0x00100000
104   - ACPI_LV_FUNCTIONS 0x00200000
105   - ACPI_LV_OPTIMIZATIONS 0x00400000
106   - ACPI_LV_MUTEX 0x01000000
107   - ACPI_LV_THREADS 0x02000000
108   - ACPI_LV_IO 0x04000000
109   - ACPI_LV_INTERRUPTS 0x08000000
110   - ACPI_LV_AML_DISASSEMBLE 0x10000000
111   - ACPI_LV_VERBOSE_INFO 0x20000000
112   - ACPI_LV_FULL_TABLES 0x40000000
113   - ACPI_LV_EVENTS 0x80000000
114   -
115   -Examples
116   ---------
117   -
118   -For example, drivers/acpi/bus.c contains this:
119   -
120   - #define _COMPONENT ACPI_BUS_COMPONENT
121   - ...
122   - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device insertion detected\n"));
123   -
124   -To turn on this message, set the ACPI_BUS_COMPONENT bit in acpi.debug_layer
125   -and the ACPI_LV_INFO bit in acpi.debug_level. (The ACPI_DEBUG_PRINT
126   -statement uses ACPI_DB_INFO, which is macro based on the ACPI_LV_INFO
127   -definition.)
128   -
129   -Enable all AML "Debug" output (stores to the Debug object while interpreting
130   -AML) during boot:
131   -
132   - acpi.debug_layer=0xffffffff acpi.debug_level=0x2
133   -
134   -Enable PCI and PCI interrupt routing debug messages:
135   -
136   - acpi.debug_layer=0x400000 acpi.debug_level=0x4
137   -
138   -Enable all ACPI hardware-related messages:
139   -
140   - acpi.debug_layer=0x2 acpi.debug_level=0xffffffff
141   -
142   -Enable all ACPI_DB_INFO messages after boot:
143   -
144   - # echo 0x4 > /sys/module/acpi/parameters/debug_level
145   -
146   -Show all valid component values:
147   -
148   - # cat /sys/module/acpi/parameters/debug_layer
Documentation/firmware-guide/acpi/debug.rst
  1 +.. SPDX-License-Identifier: GPL-2.0
  2 +
  3 +=================
  4 +ACPI Debug Output
  5 +=================
  6 +
  7 +The ACPI CA, the Linux ACPI core, and some ACPI drivers can generate debug
  8 +output. This document describes how to use this facility.
  9 +
  10 +Compile-time configuration
  11 +==========================
  12 +
  13 +ACPI debug output is globally enabled by CONFIG_ACPI_DEBUG. If this config
  14 +option is turned off, the debug messages are not even built into the
  15 +kernel.
  16 +
  17 +Boot- and run-time configuration
  18 +================================
  19 +
  20 +When CONFIG_ACPI_DEBUG=y, you can select the component and level of messages
  21 +you're interested in. At boot-time, use the acpi.debug_layer and
  22 +acpi.debug_level kernel command line options. After boot, you can use the
  23 +debug_layer and debug_level files in /sys/module/acpi/parameters/ to control
  24 +the debug messages.
  25 +
  26 +debug_layer (component)
  27 +=======================
  28 +
  29 +The "debug_layer" is a mask that selects components of interest, e.g., a
  30 +specific driver or part of the ACPI interpreter. To build the debug_layer
  31 +bitmask, look for the "#define _COMPONENT" in an ACPI source file.
  32 +
  33 +You can set the debug_layer mask at boot-time using the acpi.debug_layer
  34 +command line argument, and you can change it after boot by writing values
  35 +to /sys/module/acpi/parameters/debug_layer.
  36 +
  37 +The possible components are defined in include/acpi/acoutput.h and
  38 +include/acpi/acpi_drivers.h. Reading /sys/module/acpi/parameters/debug_layer
  39 +shows the supported mask values, currently these::
  40 +
  41 + ACPI_UTILITIES 0x00000001
  42 + ACPI_HARDWARE 0x00000002
  43 + ACPI_EVENTS 0x00000004
  44 + ACPI_TABLES 0x00000008
  45 + ACPI_NAMESPACE 0x00000010
  46 + ACPI_PARSER 0x00000020
  47 + ACPI_DISPATCHER 0x00000040
  48 + ACPI_EXECUTER 0x00000080
  49 + ACPI_RESOURCES 0x00000100
  50 + ACPI_CA_DEBUGGER 0x00000200
  51 + ACPI_OS_SERVICES 0x00000400
  52 + ACPI_CA_DISASSEMBLER 0x00000800
  53 + ACPI_COMPILER 0x00001000
  54 + ACPI_TOOLS 0x00002000
  55 + ACPI_BUS_COMPONENT 0x00010000
  56 + ACPI_AC_COMPONENT 0x00020000
  57 + ACPI_BATTERY_COMPONENT 0x00040000
  58 + ACPI_BUTTON_COMPONENT 0x00080000
  59 + ACPI_SBS_COMPONENT 0x00100000
  60 + ACPI_FAN_COMPONENT 0x00200000
  61 + ACPI_PCI_COMPONENT 0x00400000
  62 + ACPI_POWER_COMPONENT 0x00800000
  63 + ACPI_CONTAINER_COMPONENT 0x01000000
  64 + ACPI_SYSTEM_COMPONENT 0x02000000
  65 + ACPI_THERMAL_COMPONENT 0x04000000
  66 + ACPI_MEMORY_DEVICE_COMPONENT 0x08000000
  67 + ACPI_VIDEO_COMPONENT 0x10000000
  68 + ACPI_PROCESSOR_COMPONENT 0x20000000
  69 +
  70 +debug_level
  71 +===========
  72 +
  73 +The "debug_level" is a mask that selects different types of messages, e.g.,
  74 +those related to initialization, method execution, informational messages, etc.
  75 +To build debug_level, look at the level specified in an ACPI_DEBUG_PRINT()
  76 +statement.
  77 +
  78 +The ACPI interpreter uses several different levels, but the Linux
  79 +ACPI core and ACPI drivers generally only use ACPI_LV_INFO.
  80 +
  81 +You can set the debug_level mask at boot-time using the acpi.debug_level
  82 +command line argument, and you can change it after boot by writing values
  83 +to /sys/module/acpi/parameters/debug_level.
  84 +
  85 +The possible levels are defined in include/acpi/acoutput.h. Reading
  86 +/sys/module/acpi/parameters/debug_level shows the supported mask values,
  87 +currently these::
  88 +
  89 + ACPI_LV_INIT 0x00000001
  90 + ACPI_LV_DEBUG_OBJECT 0x00000002
  91 + ACPI_LV_INFO 0x00000004
  92 + ACPI_LV_INIT_NAMES 0x00000020
  93 + ACPI_LV_PARSE 0x00000040
  94 + ACPI_LV_LOAD 0x00000080
  95 + ACPI_LV_DISPATCH 0x00000100
  96 + ACPI_LV_EXEC 0x00000200
  97 + ACPI_LV_NAMES 0x00000400
  98 + ACPI_LV_OPREGION 0x00000800
  99 + ACPI_LV_BFIELD 0x00001000
  100 + ACPI_LV_TABLES 0x00002000
  101 + ACPI_LV_VALUES 0x00004000
  102 + ACPI_LV_OBJECTS 0x00008000
  103 + ACPI_LV_RESOURCES 0x00010000
  104 + ACPI_LV_USER_REQUESTS 0x00020000
  105 + ACPI_LV_PACKAGE 0x00040000
  106 + ACPI_LV_ALLOCATIONS 0x00100000
  107 + ACPI_LV_FUNCTIONS 0x00200000
  108 + ACPI_LV_OPTIMIZATIONS 0x00400000
  109 + ACPI_LV_MUTEX 0x01000000
  110 + ACPI_LV_THREADS 0x02000000
  111 + ACPI_LV_IO 0x04000000
  112 + ACPI_LV_INTERRUPTS 0x08000000
  113 + ACPI_LV_AML_DISASSEMBLE 0x10000000
  114 + ACPI_LV_VERBOSE_INFO 0x20000000
  115 + ACPI_LV_FULL_TABLES 0x40000000
  116 + ACPI_LV_EVENTS 0x80000000
  117 +
  118 +Examples
  119 +========
  120 +
  121 +For example, drivers/acpi/bus.c contains this::
  122 +
  123 + #define _COMPONENT ACPI_BUS_COMPONENT
  124 + ...
  125 + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device insertion detected\n"));
  126 +
  127 +To turn on this message, set the ACPI_BUS_COMPONENT bit in acpi.debug_layer
  128 +and the ACPI_LV_INFO bit in acpi.debug_level. (The ACPI_DEBUG_PRINT
  129 +statement uses ACPI_DB_INFO, which is macro based on the ACPI_LV_INFO
  130 +definition.)
  131 +
  132 +Enable all AML "Debug" output (stores to the Debug object while interpreting
  133 +AML) during boot::
  134 +
  135 + acpi.debug_layer=0xffffffff acpi.debug_level=0x2
  136 +
  137 +Enable PCI and PCI interrupt routing debug messages::
  138 +
  139 + acpi.debug_layer=0x400000 acpi.debug_level=0x4
  140 +
  141 +Enable all ACPI hardware-related messages::
  142 +
  143 + acpi.debug_layer=0x2 acpi.debug_level=0xffffffff
  144 +
  145 +Enable all ACPI_DB_INFO messages after boot::
  146 +
  147 + # echo 0x4 > /sys/module/acpi/parameters/debug_level
  148 +
  149 +Show all valid component values::
  150 +
  151 + # cat /sys/module/acpi/parameters/debug_layer
Documentation/firmware-guide/acpi/index.rst
... ... @@ -14,6 +14,7 @@
14 14 osi
15 15 method-customizing
16 16 DSD-properties-rules
  17 + debug
17 18 gpio-properties
18 19 i2c-muxes
19 20 acpi-lid